Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

javascript form.submit() netscape issue

Status
Not open for further replies.

moogwai

Programmer
Mar 6, 2002
11
US
salutations reader(s). I have a form with a submit/validation function. IE works lovely, netscape on the other hand... I get an error:

Error: uncaught exception: [Exception... &quot;Component returned failure code: 0x805303e8 [nsIDOMHTMLFormElement.submit]&quot; nsresult: &quot;0x805303e8 (<unknown>)&quot; location: &quot;JS frame :: file:///C:/WINNT/Profiles/Administrator.000/Desktop/app.html :: validate :: line 310&quot; data: no]

I have no idea what this means. There was an issue of Netscape saying myForm was not defined when the submit code was myForm.submit() so I changed it to x.submit() which is when I received the previously stated error message. myForm is what the form is called. Here is the abbreviated version of what I have, the error points to the line x.submit():

(in the head)
function validate()
{
x=document.myForm
if (x.First_Name.value == &quot;&quot;)
{
alert (&quot;Please enter your first name.&quot;);
x.First_Name.focus()
return;
}
x.submit()
}
...
<form name=&quot;myForm&quot; action=&quot;MAILTO:noone@nowhere.com?subject=My aching brian&quot; method=&quot;post&quot; enctype=&quot;text/plain&quot; onsubmit=&quot;return validate()&quot;>


Any points would be greatly appreciated. Please let me know if my question is indecipherable.
Thanks, Moog.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top