hi,
I have a form that uses external (non-form) buttons to submit and reset.
It is working in IE and failing in Navigator.
The call to the subroutine is working in both (the verification edits work in both) but the execution of document.form.submit() & document.form.reset() fails in Netscape.
Any ideas?
Thanks
Mike Clarke
//Validate the user name and password for presence.
function ValLogin(User,Pass)
{
if (User == ""
{
alert("Please Enter A User Name"
;
document.LoginF.UserID.focus();
return false;
}
else if (Pass == ""
{
alert("Please Enter A Password"
;
document.LoginF.Password.focus();
return false;
}
else
{
document.LoginF.submit();
return true;
}
}
<snip>
<form NAME="LoginF" ACTION="LoginVal.ASP" METHOD="POST">
<tr>
<td><input TYPE="text" SIZE="20" Name="UserID"></td></font>
</tr>
<tr><td><input TYPE="Password" SIZE="20" Name="Password"></td>
</tr>
</form>
<tr>
<td><a href="#" onClick="return ValLogin(document.LoginF.UserID.value,document.LoginF.Password.value)" onmouseover="changeImage('submit','but5h')" onmouseout="changeImage('submit','but5')">
<IMG src="images/SubmitB.gif" width="60" height="30"border="0" name="submit" alt="Submit Login"></a></td>
<td><a href="#" onclick="document.LoginF.reset()" onmouseover="changeImage('reset','but6h')" onmouseout="changeImage('reset','but6')"><IMG src="images/ResetB.gif" width="60" height="30"border="0" name="reset" alt="Reset Login"></a></td>
</tr>
I have a form that uses external (non-form) buttons to submit and reset.
It is working in IE and failing in Navigator.
The call to the subroutine is working in both (the verification edits work in both) but the execution of document.form.submit() & document.form.reset() fails in Netscape.
Any ideas?
Thanks
Mike Clarke
//Validate the user name and password for presence.
function ValLogin(User,Pass)
{
if (User == ""
{
alert("Please Enter A User Name"
document.LoginF.UserID.focus();
return false;
}
else if (Pass == ""
{
alert("Please Enter A Password"
document.LoginF.Password.focus();
return false;
}
else
{
document.LoginF.submit();
return true;
}
}
<snip>
<form NAME="LoginF" ACTION="LoginVal.ASP" METHOD="POST">
<tr>
<td><input TYPE="text" SIZE="20" Name="UserID"></td></font>
</tr>
<tr><td><input TYPE="Password" SIZE="20" Name="Password"></td>
</tr>
</form>
<tr>
<td><a href="#" onClick="return ValLogin(document.LoginF.UserID.value,document.LoginF.Password.value)" onmouseover="changeImage('submit','but5h')" onmouseout="changeImage('submit','but5')">
<IMG src="images/SubmitB.gif" width="60" height="30"border="0" name="submit" alt="Submit Login"></a></td>
<td><a href="#" onclick="document.LoginF.reset()" onmouseover="changeImage('reset','but6h')" onmouseout="changeImage('reset','but6')"><IMG src="images/ResetB.gif" width="60" height="30"border="0" name="reset" alt="Reset Login"></a></td>
</tr>