V
varkey.mathew
Hi there,
I have a basic form with a postback.
The following is a line of dynamic code written so that when the user
clicks on the Button control, he will receive a confirm messagebox.
btnSubmit.Attributes.Add("onclick","return confirm('Are you sure you
want to leave without saving your change(s)?');");
This works perfectly fine.
When I tried to alter the same so that the same functionality is
achieved by a Combobox, using the "onchange" event, I seem to hit upon
an issue.
cmbGroup.Attributes.Add("onchange","return confirm('Are you sure you
want to leave without saving your change(s)?');");
Basically, when the combo box value is changed, it pops up the confirm
box, but an "OK" response will not postback the form even though the
AutoPostBack option is set to true for the Combo box control.
Please help.
Thanks and regards,
I have a basic form with a postback.
The following is a line of dynamic code written so that when the user
clicks on the Button control, he will receive a confirm messagebox.
btnSubmit.Attributes.Add("onclick","return confirm('Are you sure you
want to leave without saving your change(s)?');");
This works perfectly fine.
When I tried to alter the same so that the same functionality is
achieved by a Combobox, using the "onchange" event, I seem to hit upon
an issue.
cmbGroup.Attributes.Add("onchange","return confirm('Are you sure you
want to leave without saving your change(s)?');");
Basically, when the combo box value is changed, it pops up the confirm
box, but an "OK" response will not postback the form even though the
AutoPostBack option is set to true for the Combo box control.
Please help.
Thanks and regards,