0

I have set the attribute of a text box to this after an event

$("#txtTitleName").attr("disabled", "disabled");

After proceeding to next page if user comes back by pressing back button,this property disappears.

What is the solution to this,I am using MVC 5

mirosh
  • 1
  • 2
  • you need to capture browsers back button event and perform your code in it , see this http://stackoverflow.com/questions/17594413/js-or-jquery-browser-back-button-click-detector – Virendra Yadav Dec 10 '15 at 07:42
  • 1
    use sessionstorage to save the state of the button – madalinivascu Dec 10 '15 at 07:44
  • browser back button event capture not works,And also the session storage not works,because page is not reloading when back button is clicked – mirosh Dec 10 '15 at 08:14

1 Answers1

0

Just an idea from my side set all the selections in session variables so that we can remember all the settings and it will be easy to get back all the times

  • When back button is clicked the page is loading from the browser cache.So session variables didn't get values in it.If i refresh its works fine – mirosh Dec 10 '15 at 10:04