PDA

Click to See Complete Forum and Search --> : Disabling a Button after its submitted, FF & IE issue. -[RESOLVED]-


Electroman
Dec 28th, 2004, 10:18 AM
The code I'm using is basically:
<script language="JavaScript">
<!--
function DisableButs()
{
document.getElementById('form1').submit.disabled = true;
document.getElementById('form1').back.disabled = true;
document.getElementById('form1').reset.disabled = true;
return true;
}
//-->
</script>





<input TYPE="submit" NAME="submit" VALUE="Continue" onclick="DisableButs();" />
Submit, Back & Reset are all buttons on the form.
This works fine in FF however in IE when i click the button it seems that it disables the button before it can submit. The back button works fine still, because it goes back a page using a second statement in the onclick event.
Should I be submitting the form in the javascript after the disable buttons call?

If so how do I do that :).

Electroman
Dec 28th, 2004, 10:30 AM
Doh, I solved it already.

I tried <input TYPE="button" NAME="submit" VALUE="Continue" onclick="document.getElementById('form1').submit(); DisableButs();" />

But it didn't work. I had to change the name of the submit button to somethign else, cos it couldn't tell the differance between the Button Submit and the function submit :).