1

I have a html page that have radio buttons that initially are all unset - this is by design.

The problem is if you move forward and then use the browser back button you could get to the page in a weird state, because the browsers reset some stuff, but not the radio buttons.

Is there event that I could handle to reset all I need when I get to the page with a back button?

gsf
  • 6,612
  • 7
  • 35
  • 64
  • 1
    See this question for what you need: http://stackoverflow.com/questions/158319/cross-browser-onload-event-and-the-back-button – aaron-bond Feb 05 '14 at 17:11
  • You could just have a small function that resets all radio buttons onload? – Sterling Archer Feb 05 '14 at 17:11
  • Don't do that. Radio buttons are designed for selecting "exactly one" option. Put a "none of these" option at the top or something instead. – Quentin Feb 05 '14 at 17:11
  • Thank you @Quentin, but I believe in this case having the submit button disabled until the user choose to be better approuch – gsf Feb 05 '14 at 17:19
  • why is it a problem that the radio buttons are not reset? if it is the submit button that becomes a problem, then onload you can query the state of the radio buttons and set the appropriate state for the submit button. – yas Feb 05 '14 at 17:21
  • @dave the form is extremely simple - in fact it is only this radio option. Moving back will make sense only if you feel that you made the wrong choice the first time. Preserving it makes no usability sense. – gsf Feb 05 '14 at 17:28
  • If someone goes back, it is usually because they feel they made a mistake (unless you have failed to provide a sensible path forwards to start the sequence of forms again). – Quentin Feb 05 '14 at 18:27

0 Answers0