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... "Component returned failure code: 0x805303e8 [nsIDOMHTMLFormElement.submit]" nsresult: "0x805303e8 (<unknown>)" location: "JS frame :: file:///C:/WINNT/Profiles/Administrator.000/Desktop/app.html :: validate :: line 310" 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 (310)x.submit():
(in the head)
function validate()
{
x=document.myForm
if (x.First_Name.value == ""
{
alert ("Please enter your first name."
x.First_Name.focus()
return;
}
x.submit()
}
...
<form name="myForm" action="MAILTO:noone@nowhere.com?subject=My aching brian" method="post" enctype="text/plain" onsubmit="return validate()">
Any points would be greatly appreciated. Please let me know if my question is indecipherable.
Thanks a lot, Moog.
Error: uncaught exception: [Exception... "Component returned failure code: 0x805303e8 [nsIDOMHTMLFormElement.submit]" nsresult: "0x805303e8 (<unknown>)" location: "JS frame :: file:///C:/WINNT/Profiles/Administrator.000/Desktop/app.html :: validate :: line 310" 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 (310)x.submit():
(in the head)
function validate()
{
x=document.myForm
if (x.First_Name.value == ""
{
alert ("Please enter your first name."
x.First_Name.focus()
return;
}
x.submit()
}
...
<form name="myForm" action="MAILTO:noone@nowhere.com?subject=My aching brian" method="post" enctype="text/plain" onsubmit="return validate()">
Any points would be greatly appreciated. Please let me know if my question is indecipherable.
Thanks a lot, Moog.