Reputation: 9615
An 'input button tag' is disabled with a value, on clicking of that button , but when reload current page in browser doesn't change the button to enable(disabled = 'false') , only value in the button will be removed .
I used an 'a href' in that page it will redirect to old state(disabled = 'false').
<input type="button" value="" onclick="button(0,0);count += 1; counts(count);" id="buttonId" class="button-click" name="button">
<input disabled="disabled" name="button" class="button-click" id="buttonId" onclick="button(0,0);count += 1; counts(count);" value="YES" type="button">
<input disabled="disabled" name="button" class="button-click" id="buttonId" onclick="button(0,0);count += 1; counts(count);" value="" type="button">
I am using jQuery, on button click I have written code to disable that input tag .
Is it possible to write code on 'reload button in browser' in jQuery or any other idea
Upvotes: 0
Views: 1353
Reputation: 41
Although it has been almost a year that your question is not answered, and I found it because I have same problem. I found the solution at another discussion, here it is the link Jquery UI button gets disabled on refresh
You just put the line $('button').removeAttr('disabled').button();
Upvotes: 2