I have a js function called by an onclick event in a radio button.
If i put the function in the same ascx where the radio button is defined, the function is not called. So i tried to put it on the ascx which includes the ascx with the button and it works, but i have this error on the debugger :
Failed to load resource: net::ERR_NAME_NOT_RESOLVE
Here is the function:
<script>
function UcSelect() {
var value = $("#rbtTipo :checked").val();
if (value == 'E') {
alert("aaaaaaaaaaaaa");
}
if (value == 'G') {
alert("bbbbbbbbbbbbbbbbbb");
}
return true;
}
rbtTipolike that in the control that has that property in its code behind, i.e. only in the control where the radio button is defined. If you want to use it somewhere else you need to expose that property publicly in that control and access it using a reference to that control. That's why you get the error that the name doesn't resolve. I think that you should put the function back in the control where the radio button is, and try to find out why that didn't work for you.