RadioButtonList and JavaScript ... Help

S

Sean

Hi ....

I have a radiobutton list and a label in a webform.

<asp:radiobuttonlist id="one" runat="server" CssClass="text"
AutoPostBack="False" RepeatDirection="Horizontal">
<asp:ListItem Value="one">one</asp:ListItem>
<asp:ListItem Value="two">two</asp:ListItem>
<asp:ListItem Value="three">three</asp:ListItem>
<asp:ListItem Value="four">four</asp:ListItem>
<asp:ListItem Value="five">five</asp:ListItem>
</asp:radiobuttonlist>

<br>

<asp:Label id="Label1" runat="server" Visible=False>Label</asp:Label>

I have set the AutoPostBack to False, as i want to be able to use the
keyboard to navigate thru' the RadioButtonList.

Once a particular radiobutton is selected, i want to be able to check with
RadioButton value selected and then display a hidden label.

On Page Load, i call the javascript function
ddPayer.Attributes.Add("onclick", "check()")

where
<script language="javascript">
function check(){

document.Form1.TextBox1.value = "test";
document.Form1.Label1.style.visibility = true; --- Drop an error here

}

</script>

I have been able to write a value to a textbox once any radiobutton has been
selected.

But i can't seem to trap the value of each of those radiobuttons, so i could
make it visible.

Any help is greatly appreciated.
 
H

Herfried K. Wagner

Hello,

Sean said:
I have a radiobutton list and a label in a webform.

<asp:radiobuttonlist id="one" runat="server" CssClass="text"
AutoPostBack="False" RepeatDirection="Horizontal">
<asp:ListItem Value="one">one</asp:ListItem>
<asp:ListItem Value="two">two</asp:ListItem>
<asp:ListItem Value="three">three</asp:ListItem>
<asp:ListItem Value="four">four</asp:ListItem>

Newsgroups for ASP .NET:

news://news.microsoft.com/microsoft.public.dotnet.framework.aspnet

Regards,
Herfried K. Wagner
 
S

Stuart Dickerson

This is not an answer to his problem. How do you get the value of the
readiolist when the form is posted to the server?
 

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
473,754
Messages
2,569,528
Members
45,000
Latest member
MurrayKeync

Latest Threads

Top