473,386 Members | 1,694 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

RadioButtonList and JavaScript ... Help

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.
--
Thank You,
Sean
Nov 19 '05 #1
1 3294
Hello,

"Sean" <nospam@> schrieb:
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....amework.aspnet

Regards,
Herfried K. Wagner
--
MVP · VB Classic, VB .NET
http://www.mvps.org/dotnet
Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Suresh.P.R | last post by:
Hi, While using the RadioButtonList control, that I populated in the runtime, I am not able to get the selected item in the javascript while referring document.Form.RadioButtonList.value. ...
2
by: sramruttun | last post by:
hi I have a checkbox and a radiobuttonlist (the radiobuttonlist contains 2 items) in my form. The radiobuttonlist has its visible property set to false at design time. At run time, when the...
2
by: Sean | last post by:
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...
2
by: mg | last post by:
After a selection is made in the following RadioButtonList <asp:RadioButtonList id="RadioButtonList1" runat="server"> <asp:ListItem Value="Y"></asp:ListItem> <asp:ListItem...
5
by: DotNetGruven | last post by:
Anyone have any pointers on how to set the Value and Selected attributes in a ListItem in a RadioButtonList that is in a DataGrid? Here's what I have ------DataGrid------ -- BoundColumn 0 --...
6
by: DotNetGruven | last post by:
I have a webform that has a DataGrid on it with a RadioButtonList in each row. It is a simple On & Off. When the User Clicks on either of the RadioButtons, I need to postback to the server and...
0
by: Ryan Taylor | last post by:
Hello. I am having another issue. I need to execute some JavaScript whenever a radio button is clicked. I am currently using a RadioButtonList control to generate the radio buttons because of...
2
by: Alphonse Giambrone | last post by:
Hi all, I have two radiobuttonlist controls on a page. When a user checks 'No' for rblDeleted, I want to automatically set rblSendCard to 'No' and disable it. The javascript function I wrote to...
1
by: novice_developer | last post by:
Hi All, there is a radiobuttonlist having 2 list items (state & zipcode). when i select state radiobutton the zipcode textbox should be disabled and when i select a zipcode radiobutton the state...
10
by: satyasree | last post by:
how do i reset radiobuttonlist in javascript i need to reset radiobuttonlist on click of a hyperlink i have written the code as ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.