I've got an asp.net page and won't be able to use the update panel for asynchronous updates. I'm trying to figure out how to have a selection of a radiobuttonlist change the selected item in another radiobuttonlist. When rendered, the named elements are actually tables, with individual radiobuttons for each list item. Anybody got an idea how I can do this?
Code:<script language="javascript" type="text/javascript"> // For changing sessions function getSessions() { var CHK = document.getElementByName('radF'); var checkbox = CHK.getElementsByTagName('input'); var CHK2 = document.getElementByName('radP'); var checkbox2 = CHK2.getElementByTagName('input'); for (var i = 0; i < checkbox.length; i++) { if (checkbox[i].checked) { if (checkbox[i].value = 'three') { for (var2 = j = 0; j < checkbox2.length; i++) { if (j = 2) { checkbox2.selectedIndex = j } } } } } } </script> </head> <body> <form id="form1" runat="server"><asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager> <asp:RadioButtonList id="radP" name="radP" runat="server" > <asp:ListItem Text="0" Value="0" Selected="true" /> <asp:ListItem Text="1" Value="1" /> <asp:ListItem Text="2" Value="2" /> </asp:RadioButtonList><br /> <asp:RadioButtonList id="radF" name="radF" runat="server" onClick="javascript:getSessions(this.form);" > <asp:ListItem Text="0" value="0" Selected="True" /> <asp:ListItem Text="1" Value="1" /> <asp:ListItem Text="2" VaLUE="2" /> <asp:ListItem Text="3" VALUE="3" /> </asp:RadioButtonList><br />


Reply With Quote

Bookmarks