Javascript error in Netscape

Results 1 to 2 of 2

Thread: Javascript error in Netscape

  1. #1
    Join Date
    Dec 1969

    Default Javascript error in Netscape

    Hi,<BR>We have put the following javascript in a single page and it works fine, but<BR>when we put the same script in a frame it will not work with Netscape 4.7<BR><BR>&#060;SCRIPT language="JavaScript"&#062;<BR>&#060;!-- Hide<BR>function GetName()<BR>{<BR> var textName, textValue, textVal, nNr;<BR> textName = document.form1.elements[0].name;<BR> alert("The name is: " + textName);<BR> textValue = document.form1.elements[0].value;<BR> alert("The value is: " + textValue);<BR> nNr = document.form1.elements.length;<BR> alert("Elements: " + nNr);<BR>}<BR>// End Hide ---&#062;<BR>&#060;/script&#062;<BR>&#060;form name="form1" method="post" action=""&#062;<BR> &#060;input type="text" name="textfield"&#062;<BR> &#060;input type="button" name="button" value="Button" OnClick=GetName()&#062;<BR>&#060;/form&#062;<BR><BR>Does somebody know what is wrong is this script ? when I put in the Netscape<BR>location bar javascript: i get this error<BR>Error on Line 10<BR>document.form1<BR><BR>Thanks in advanced<BR>

  2. #2
    Join Date
    Dec 1969

    Default Worked fine for me...

    ...I put that into an .html file, I created a &#060;FRAMESET&#062; file that used that as one of the frames. I used NS 4.7. It worked perfectly.<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts