Page 1 of 1

Submit form once, disable submit, then go back & enable it??

Posted: Fri Jan 15, 2010 12:33 pm
by ShadowIce
How can I make this code disable the submit button once it has been pressed, then if the user hits back or GOES back, it will re-enable it again?

Code: Select all

<SCRIPT LANGUAGE="JavaScript" TYPE="text/JavaScript">
 
function formControl(submitted) 
{
   if(submitted=="1") 
    {
   commentForm.Submit.disabled=true
   alert("Thanks for your comments!")
    }
}
 
</SCRIPT>
Thanks!

ShadowIce~

Re: Submit form once, disable submit, then go back & enable it??

Posted: Fri Jan 15, 2010 7:03 pm
by Christopher
Is the form redirected to a different page when successfully submitted? Or does it stay on the same page?

Re: Submit form once, disable submit, then go back & enable it??

Posted: Sat Jan 16, 2010 7:10 am
by ShadowIce
It's redirected to a different page