Enabling disabled submit button on browser's Back action

Enabling disabled submit button on browser's Back action

Hello Everyone,

when the following code is used in my JSP page:
  1. $('#myForm').bind('submit', function() {
  2.   $('#submit').attr('disabled', 'disabled');
  3. });

it disables the submit button when my form is submitted (IDs are used). This action displays a result page. If the browser's Back button is pressed to change some of entered items, the submit button in Firefox is still disabled, while the same action in MSIE8 enables it again. I don't know if this is exactly JavaScript/browser/chache issue, but any idea how to get the submit button enabled 'automatically' again is appreciated. Unfortunately the refresh button in Firefox doesn't help either (probably JSP issue) - I have to press Enter on the address bar which is not very obvious for every user.

Jan