By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
462,948 Members | 593 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 462,948 IT Pros & Developers. It's quick & easy.

Trigger function when back button is pressed

P: 116
I have a page with radio buttons that either enable or disable textboxes depending on the radio button selection. When the user clicks submit the they are taken to a thank you page, but if they hit the back button on the browser the radio buttons both return false and the correct boxes are not disabled... Is there a way to trigger a function or store what boxes are diabled?

I tried clearing everything just before the redirect as a quick fix, but that did not help.

I am using this with .NET 2.0 C# if that makes a difference.

In a nutshell, I either need to make sure the form is cleared or the correct textboxes are disabled when the user hits the back button on the browser.
Jan 29 '08 #1
Share this Question
Share on Google+
1 Reply

Expert Mod 5K+
P: 5,390
hi ...

to clear the form you may use the onload-event of the page to call a function that inits all fields the way you want ... or you may use a cookie and when the onload fires and finds the cookie then restores the appropriate values ...

kind regards
Jan 30 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.