Justin John
Justin John

Reputation: 9615

Disabled input tag doesn't enable when reload current page

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').

Before Click of button

    <input type="button" value="" onclick="button(0,0);count += 1; counts(count);" id="buttonId" class="button-click" name="button">

After Click of button

    <input disabled="disabled" name="button" class="button-click" id="buttonId" onclick="button(0,0);count += 1; counts(count);" value="YES" type="button">

After reload of webpage

    <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

Answers (1)

dnugroho
dnugroho

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

Related Questions