When I have a js function called by an onclick
event in a radio button, it doesn't work if the function is placed in the same ascx file where the radio button is defined. To resolve this issue, I moved the function to the ascx that includes the ascx with the button, and it now works. However, when I check the debugger, I see the following error:
Failed to load resource: net::ERR_NAME_NOT_RESOLVE
Below is the function in question:
<script>
function UcSelect() {
var value = $("#rbtTipo :checked").val();
if (value == 'E') {
alert("aaaaaaaaaaaaa");
}
if (value == 'G') {
alert("bbbbbbbbbbbbbbbbbb");
}
return true;
}