Kathryn77
asked on
How to add a javascript confirm to a checkbox with a checkedChange event
I have a checkbox that I need to add a client side confirm before firing the checkedChanged event. THe problem is that the checked change event is not firing after the javascript. Currently I don't have the CheckedChanged event doing anything, I just have a breakpoint making sure it gets there.
Thanks!
Here is my code:
Thanks!
Here is my code:
On my webpage:
<asp:CheckBox ID="chkAllData" Text="All Information Has Been Entered"
runat="server" AutoPostBack="True" CausesValidation="False" />
In the page load:
Me.chkAllData.Attributes.Add("onclick", "return confirm('Are you sure you want to delete?');")
Then the CheckedChanged method:
Protected Sub chkAllData_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles chkAllData.CheckedChanged
If AccidentID.Value <> "" Then
End If
End Sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER