Forum Moderators: open

Message Too Old, No Replies

Disabling next buttons when clicked

Then using back buttons

         

aspdaddy

11:27 am on Jan 25, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have a form that runs a generic validate function when submitted. The last thing it does before posting is:

document.frm.Submit.disabled=false;

On the next page I have a back button that uses this code:

onClick='history.go(-1)'

This works fine in IE7, but in Firefox 3.x it leaves the next button still disabled.

How can I make it work in Firefox as in IE7 ?

Thanks

Fotiman

5:34 pm on Jan 25, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



From the code above, I would deduce that you have a submit button with the name "Submit". In general, it's not a good idea to name items "Submit" (the form has a "submit" method defined already, so this could be confusing). But that shouldn't be causing any problems as JavaScript is case sensitive.

Are you certain that document.frm.Submit.disabled=false; is executing? For example, if there was an error in your JavaScript before this line that caused it to stop processing, then that could cause the behavior you describe. I just tried a quick test and it seems to work correctly for me.