client side

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hey all,

i have a radiobuttonlist on my webform. i'd like to run some client-side
javascript that when you click it it puts the value of the option selected
into a textbox.

how do i do that?

thanks,
rodchar
 
function chgInfo()
{
var txtInfo = document.getElementById("TextBox1");
var rbList = document.getElementById("RadioButtonList1");
//Now Loop
for (i=0; rbList.options.length; i++)
{
if(rbList.options.selected)
{
txtInfo.value = rbList.options.value;
}
}
}


Error: 'options.length' is null or not an object is what i get. Any ideas?
 
Back
Top