Button becaming disabled after going back in browser history

Button becaming disabled after going back in browser history

Hi guys i am using jquery 1.5.1 and jquery-ui 1.8.10. Here is I am asked the same question on stackoverflow http://stackoverflow.com/questions/5368826/button-becamind-disabled-after-going-back-in-browser-history
still no responses there.

Just duplicate this question here:

I have such button:

<button value="1" name="submit" disabled="true" id="signup-bb" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-disabled ui-state-disabled ui-button-text-only" role="button" aria-disabled="true">

After clicking some radiobutton on that page, "signup-bb" button becaming available

Enabling "signup-bb" button:

        $("signup-bb").removeAttr('disabled');
        $
("signup-bb").attr('aria-disabled', false);
        $
("signup-bb").removeClass('ui-button-disabled');
        $
("signup-bb").removeClass('ui-state-disabled');

after that my button beaming like that:

<button value="1" name="submit" aria-disabled="false" id="signup-bb" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" role="button">

After i clicking this button form getting send to server where after some processing i am redirecting to another controller, all looking good, but then if i am clicking go back browser button i am coming to previous page with the button i made clickable ("signup-bb") but this button in disabled state there:

<button value="1" name="submit" disabled="true" id="signup-bb" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-disabled ui-state-disabled ui-button-text-only" role="button" aria-disabled="true">

Any thoughts how to fix that, when user click back to display him the state which it was before?