Forum Moderators: open
Here is what I have:
<form name="frmLogin" id="frmLogin" target="_blank" autocomplete="on" onsubmit="return ValidateLogin(this)" action="authenticate.asp" method="post">
and for the button...
<input name="btnLogin" type="submit" class="button" value="Log In" />
TIA.
onsubmit="if(ValidateLogin(this)) {setTimeout('document.getElementById(\'frmLogin\').reset()',5000); return true;} else {return false;}"
This will reset the form after 5 secs if the JS validation passes ok. The delay is to give enough time for the form values to be passed to your authenticate.asp script. If, however, there is an incredible delay in loading 'authenticate.asp' then your form values could be lost before they get a chance to be authenticated! In which case you'd have to increase the delay.
Personally, I would have thought it was best to try and avoid the target="_blank" if possible.