P
Pierson C
Newbie question:
I have a dropdownlist user control and a radiobutton user control on my
WebForm. I want to simply check the radiobutton when the dropdownlist is
changed.
The OnSelectedIndexChanged method is server side and must post to fire. I
understand I need to use Javascript for the client side interaction, but I am
having trouble connecting the control to the script function.
___________________________________________________________
<script language="javascript">
function changed(cbo){
var rbS = document.getElementById('<%=rbSchool.UniqueID%>');
rbS.Checked = true;
}
</script>
<asp:radiobutton id="rbSchool" runat="server" Text="by School"
GroupName="rbSearch"></asp:radiobutton>
<asp:dropdownlist id="cboSchools" OnSelectedIndexChanged="changed(this)"
Runat="server" Width="208px"></asp:dropdownlist>
______________________________________________________________
It is expecting a server side function: 'ASP.frmPROOF_aspx' does not
contain a definition for 'changed'
Any help would be greatly appreciated!
Pierson
I have a dropdownlist user control and a radiobutton user control on my
WebForm. I want to simply check the radiobutton when the dropdownlist is
changed.
The OnSelectedIndexChanged method is server side and must post to fire. I
understand I need to use Javascript for the client side interaction, but I am
having trouble connecting the control to the script function.
___________________________________________________________
<script language="javascript">
function changed(cbo){
var rbS = document.getElementById('<%=rbSchool.UniqueID%>');
rbS.Checked = true;
}
</script>
<asp:radiobutton id="rbSchool" runat="server" Text="by School"
GroupName="rbSearch"></asp:radiobutton>
<asp:dropdownlist id="cboSchools" OnSelectedIndexChanged="changed(this)"
Runat="server" Width="208px"></asp:dropdownlist>
______________________________________________________________
It is expecting a server side function: 'ASP.frmPROOF_aspx' does not
contain a definition for 'changed'
Any help would be greatly appreciated!
Pierson