473,385 Members | 2,269 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,385 software developers and data experts.

Regarding RadioButtonList Control

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.

What is the solution.
The DropDownList control is able to refer in javascript like
document.Form.DropDownList.value

Please instruct me.
=====================Suresh
Nov 17 '05 #1
2 4149
Hi,

please use following javascript to get selected radio button value
function GetSelectedRadioOption(rbList)
{
var iIndex=0;
while(document.getElementById(rbList + '_' + iIndex))
{
if (document.getElementById(rbList + '_' + iIndex).checked)
{
var selected = document.getElementById(rbList + '_' + iIndex).value;
return selected;
}
iIndex=iIndex+1;
}
}
"Suresh.P.R" wrote:
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.

What is the solution.
The DropDownList control is able to refer in javascript like
document.Form.DropDownList.value

Please instruct me.
=====================Suresh

Nov 17 '05 #2
Hi Sameer Chandargi,

It is working fine. Thanks.

======================Suresh.P.R

"Sameer Chandargi" wrote:
Hi,

please use following javascript to get selected radio button value
function GetSelectedRadioOption(rbList)
{
var iIndex=0;
while(document.getElementById(rbList + '_' + iIndex))
{
if (document.getElementById(rbList + '_' + iIndex).checked)
{
var selected = document.getElementById(rbList + '_' + iIndex).value;
return selected;
}
iIndex=iIndex+1;
}
}
"Suresh.P.R" wrote:
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.

What is the solution.
The DropDownList control is able to refer in javascript like
document.Form.DropDownList.value

Please instruct me.
=====================Suresh

Nov 17 '05 #3

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

Similar topics

2
by: Mike S | last post by:
I am trying to use a RadioButtonList bound to a custom datasource to acomplish some user functionality. I want to add various onmouseover/onmouseout/onblur/onfocus events to each individual...
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...
4
by: Emil | last post by:
Can somebody tell me what would be the syntax for having an if statement and setting the selected index of a radiobuttonlist? This is my first project using ASP.net and I use C#. I have a repeater...
5
by: Øyvind Isaksen | last post by:
I'm making a page to update articles. When a radiobuttonlist is displayed, I want the stored value to be displayed as default (checked). Example: I use a procedure to display the...
2
by: Michael Bohman | last post by:
Hi, i have a small problem with assigning a database value to a RadioButtonList control. On my form i have 3 user admin=1, premium=2 and basic=3, theese values is stored in an access database in a...
5
by: =?Utf-8?B?UGF1bA==?= | last post by:
Hallo, I have a radiobuttonlist control that is added on a custom Web User Control. This control has a property that exposes the SelectedIndex property of the embedded radiobuttonlist. When...
0
by: =?Utf-8?B?QW5keSBpbiBTb3V0aCBKZXJzZXk=?= | last post by:
I want to use a RadioButtonList Control(HTML) in a GridView control. I can see the RadioButtonList control with each row in the GridView with the code: <asp:GridView ID="GridView1"...
6
by: SAL | last post by:
hello, I'm using a radiobuttonlist in an updatepanel in an item template in a Gridview control. I'm populating the radiobuttonlist in the RowDataBound event. I have the control toolkit registered...
13
by: tommymo | last post by:
Hi everyone I'm new to this site and the world of ASP.Net C# programming. I have been learning controls and integrating them with a SQL database. So far I have been able to move along and understand...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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,...

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.