Getting SelectedValue from RadioButtonList using javascript

P

pierre

Hi,

Can anyone tell me how to retreive the SelectedValue from a
RadioButtonList, using javavscript.

Here is my code:

<ASP:RADIOBUTTONLIST id="optOption" runat="server"
ONCLICK="javascript:alert(document.all.optOption.selectedItem);"></ASP:RADIOBUTTONLIST>

This is not working. I am getting an error saying that
'document.all.optOption.selectedItem is null or not an object'

Thanks in advance,
Pierre
 

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

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top