views:

1381

answers:

4

I wired the Change event handler for an ASP.NET radiobuttonlist like this in the ready() handler in JQuery like this:

$("#<%=rblYesNo.ClientID%>").change(MyFunction);

When I select one of the radio buttons, MyFunction doesn't get called. Why?

+1  A: 

IE has a problem with the 'change' event on radio buttons, try using click instead:

$("#<%=rblYesNo.ClientID%>").click(MyFunction);
karim79
+1  A: 

Remember, a radio button list doesn't have a single identifier. The radio buttons are linked together by their NAME. If I recall, rblYesNo.ClientID will probably be just a div that wraps the radio buttons. Try:

$("#<%=rblYesNo.ClientID%> input").change(function(){

});
aquinas
A: 
DineshHona
A: 
DineshHona