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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

a little help please... 1
how to: 1
how to: please 2
is this possible 6
CheckChanged inside my user control 2
client side way 2
call javascript 3
problem in calling javascript function in radiobuttonList 1

Back
Top