I have a problem with javascript.
In my code there is a radio button, on click it should call the UcSelect() function. I tried the code below but it didn't work.
The function just try to print something in order to help me to understand the behavior of the code.
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js">
function UcSelect() {
alert('hello1');
if ($("#rbtTipo :checked").val() == 'E') {
alert("aaaaaaaaaaaaa");
}
if ($("#rbtTipo :checked").value == 'E') {
alert("bbbbbbbbbbbbbbbbbb");
}
return true;
}
</script>
And the radio button:
<asp:RadioButtonList ID="rbtTipo" runat="server" Style="margin-top: 4px; margin-bottom: 8px;" onclick="UcSelect();" >
<asp:ListItem Value="E"> Nuovo Coefficiente Energia</asp:ListItem>
<asp:ListItem Value="G"> Nuovo Coefficiente Gas</asp:ListItem>
</asp:RadioButtonList>