G
Gary W. Smith
I have a list box that contains a couple items. I would like to add a
confirmation dialog to the onchange event, so if they change the
value, it will confirm the change.
Here is what I have done in the past for other things:
onclick/onchange="javascript: if (!confirm('are you sure')) return
false;"
When I do the onchange for the list box, the dialog is presented, but
selected to cancel still results in the list item being changed. I
would like to revert back to the original value in this case. To
complicate matters, we are building the list dynamically through
ASP.Net.
Any help, or sample code, would be greatly appreciated.
Thanks,
Gary
confirmation dialog to the onchange event, so if they change the
value, it will confirm the change.
Here is what I have done in the past for other things:
onclick/onchange="javascript: if (!confirm('are you sure')) return
false;"
When I do the onchange for the list box, the dialog is presented, but
selected to cancel still results in the list item being changed. I
would like to revert back to the original value in this case. To
complicate matters, we are building the list dynamically through
ASP.Net.
Any help, or sample code, would be greatly appreciated.
Thanks,
Gary