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

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,681
Members
48,796
Latest member
Greg L.

Latest Threads

Top