0

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

Justin John
  • 9,223
  • 14
  • 70
  • 129

1 Answers1

2

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();

Community
  • 1
  • 1
dnugroho
  • 41
  • 2
  • 8