T
tshad
I have the following code that attaches a Javascript confirm box to my
checkbox. When I select the checkbox, the window comes up fine, but it
never executes the XfertoDefault_Click function when I press the Yes button.
If I take off the Javascript event, the checkbox works fine.
XferToDefault.Attributes.Add("onclick", "return confirm('Are you sure you
want copy these entries?');")
<asp:CheckBox ID="XferToDefault" AutoPostBack="true"
OnCheckedChanged="XferToDefault_Click" runat="server"/>
If I change the checkbox to an ImageButton, it all works fine - the
Javascript window as well as going to the function after the Yes button is
pressed.
<asp:ImageButton ID="XferToDefault" OnClick="XferToDefault_Click"
ImageUrl="../../buttons/xfer.gif" runat="server"/>
Why doesn't the checkbox (or radiobutton) work?
Thanks,
Tom
checkbox. When I select the checkbox, the window comes up fine, but it
never executes the XfertoDefault_Click function when I press the Yes button.
If I take off the Javascript event, the checkbox works fine.
XferToDefault.Attributes.Add("onclick", "return confirm('Are you sure you
want copy these entries?');")
<asp:CheckBox ID="XferToDefault" AutoPostBack="true"
OnCheckedChanged="XferToDefault_Click" runat="server"/>
If I change the checkbox to an ImageButton, it all works fine - the
Javascript window as well as going to the function after the Yes button is
pressed.
<asp:ImageButton ID="XferToDefault" OnClick="XferToDefault_Click"
ImageUrl="../../buttons/xfer.gif" runat="server"/>
Why doesn't the checkbox (or radiobutton) work?
Thanks,
Tom