ASP.NET jQuery $find() Not Working In Onclick() Event Of Radio Button
In an application where i want trigger the onclick event of radio button
that has a $find() method, which will retrieve the radio button's
value, the code below doesn't work.
where dpe1 is a DynamicPopulateExtender Ajax Extender.The solution I made was to remove the populate logic and transfer it
to a javascript function. Here's the revised code:
Cheers!
<input type="radio" id="rb1" name="format" value="format2" runat="server" onclick="$find('<%=dpe1.ClientID %>').populate(this.value);" />d.m.y <input type="radio" id="rb2" name="format" value="format3" runat="server" onclick="$find('<%=dpe1.ClientID %>').populate(this.value);" />y/m/d
//javascript code function rbFunction() { //$find('<%=dpe1.ClientID %>').populate($("input:radio:checked").val()); } //html code <input type="radio" id="rb2" name="format" value="format2" runat="server" onclick="javascript:rbFunction()" />d.m.y <input type="radio" id="rb3" name="format" value="format3" runat="server" onclick="javascript:rbFunction()" />y/m/d
Comments
Post a Comment