JavaScript "confirm" on SelectedIndexChange of RadioButtonList

Posted by Brian David Berman on Stack Overflow See other posts from Stack Overflow or by Brian David Berman
Published on 2010-04-09T20:32:00Z Indexed on 2010/04/09 22:43 UTC
Read the original article Hit count: 294

I have a RadioButtonList control and I would like to do a Javascript "confirm" when a user tries to change the index. Currently AutoPostBack is set to TRUE. I can, of course, just call __doPostBack from within a javascript function, etc. I tried a few things with jQuery but you have to worry about mousedown vs. click and then there is always the fact that you can click the checkbox label to select it, etc. Anyone have a nice solution for this?

To be clear, I am looking for a way to prompt the user with a confirm box prior to their selection being made and triggering a postback.

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about radiobuttonlist