Greetings experts,
I have a Repeater control with radiobuttonlist:
Then I have some textbox controls inside a div. This div is outside the Repeater control:
I understand about using wildcards when dealing with controls inside a Repeater.
My issue is the DIV is outside the Repeater control while the RadioButtonList is inside the Repeater control.
The following script is not enabling or disabling the DIV when Used option is selected.
Any ideas how to get this to work?
Thanks in advance
I have a Repeater control with radiobuttonlist:
<asp:RepeaterID="repeaterItems"runat="server"Purchased:<asp:radiobuttonlistID="rblPurchaseType"runat="server"RepeatDirection="Horizontal"TextAlign="Right"style="display:inline;"><asp:ListItemText="New"/><asp:ListItemText="Used"/></asp:RadioButtonList></asp:Repeater>
Then I have some textbox controls inside a div. This div is outside the Repeater control:
<divid="purchaseNewUsed"runat="server"><tableborder="0"width="100%"><tr><td><tr><td>NAME:</td><td><divclass="input text"><asp:TextBoxID="txtPrevOnwerName"style="width:450px;"runat="server"></asp:TextBox></div></td></tr><tr><td>ADDRESS:</td><td><divclass="input text"><asp:TextBoxID="TextBox6"style="width:450px;"runat="server"></asp:TextBox></div></td></tr><tr><td> CITY:</td><td><divclass="input text"><asp:TextBoxID="TextBox7"style="width:150px;"runat="server"></asp:TextBox></div></td><td> STATE:</td><td><divclass="input select"><asp:DropDownListID="DropDownList2"runat="server"AppendDataBoundItems="True"><asp:ListItemValue=""Selected="False"></asp:ListItem></asp:DropDownList></div></td><td> ZIP:</td><td><divclass="input text"><asp:TextBoxID="TextBox9"style="width:50px;"runat="server"></asp:TextBox></div></td></tr></table></div>
I understand about using wildcards when dealing with controls inside a Repeater.
My issue is the DIV is outside the Repeater control while the RadioButtonList is inside the Repeater control.
The following script is not enabling or disabling the DIV when Used option is selected.
Any ideas how to get this to work?
script type="text/javascript"> $(document).ready(function() { $('#rblPurchaseType input').change(function () { if ($(this).val() == "New") { $("#purchaseNewUsed").prop("disabled", true); } else { $("#purchaseNewUsed").prop("disabled", false); } }); }); </script>
Thanks in advance