[Javascript] Broken script !

Cutter Bl cutterbl at hotmail.com
Wed Apr 3 07:24:41 CST 2002


The "javascript:" construct is unnecessary in the onClick event because it 
is implied. I would try something more like this:

<SCRIPT LANGUAGE="JavaScript">
<!-- //Hide from older browsers
    function loadframe(url) {
        parent.topFrame.location=url;}
    --> //end
</SCRIPT>

  <a href = "javascript:void()" 
onclick="loadframe('question.htm')">Click</a>

Cutter
http://www.falcon-knives.com

----Original Message Follows----
From: "Dan Costea" <costea.dan at ssi-schaefer.ro>

modify your script like this:

<SCRIPT LANGUAGE="JavaScript">
function loadframe(url) {
parent.topFrame.location=url;

  }
  </SCRIPT>

  <a href = "#" onclick="javascript:loadframe('question.htm')">Click</a>



----- Original Message -----
From: <RFreeman at ncb.org.uk>
To: <javascript at LaTech.edu>
Sent: Wednesday, April 03, 2002 4:47 AM
Subject: [Javascript] Broken script !


 > Hi all,
 >
 > First post here as I am new to jscript programming. When a certain link 
is
 > clicked, I want it to run this script and to change the top frame in my
 > framset (cunningly named topFrame) but it does not seem to work - any 
help
 > much appreciated.
 >
 > Yours,
 >
 > Rich
 >
 > <SCRIPT LANGUAGE="JavaScript">
 > function loadframe(url) {
 > parent.topFrame.location="url"
 >
 > }
 > </SCRIPT>
 >
 > <a href = "#" onclick="javascript:loadframe(question.htm)">Click</a>
 >
 >
 > _______________________________________________
 > Javascript mailing list
 > Javascript at LaTech.edu
 > https://lists.LaTech.edu/mailman/listinfo/javascript

_______________________________________________
Javascript mailing list
Javascript at LaTech.edu
https://lists.LaTech.edu/mailman/listinfo/javascript


_________________________________________________________________
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx




More information about the Javascript mailing list