I have a radio button list
When I change the selection on this list, I need to confirm that the user really wants to do this, since it will wipe out some of their information. So I added the following code in my page load:
This works great, kind of. If the user hits the actual radio button, the popup works as expected. If they hit the label, then select "OK", the popup comes up a second time. Please, if anyone has any ideas, I'd really appreciate it! Thanks,
Code:
<asp:RadioButtonList id="rblSearchType" runat="server" CssClass="DROPDOWNLIST" AutoPostBack="True">
<asp:ListItem Value="PAPPLICATION" Selected="True">Patent Application</asp:ListItem>
<asp:ListItem Value="PFAMILY">Patent Family</asp:ListItem>
</asp:RadioButtonList>
When I change the selection on this list, I need to confirm that the user really wants to do this, since it will wipe out some of their information. So I added the following code in my page load:
Code:
if not ispostback() then
rblSearchType.Attributes.Add("onSelectedIndexChanged", "javascript:return confirm('Are you sure you want to change your search type? All Search Criteria and Output Criteria will be cleared.');")
end if
This works great, kind of. If the user hits the actual radio button, the popup works as expected. If they hit the label, then select "OK", the popup comes up a second time. Please, if anyone has any ideas, I'd really appreciate it! Thanks,