473,698 Members | 2,445 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.R adioButtonList. value.

What is the solution.
The DropDownList control is able to refer in javascript like
document.Form.D ropDownList.val ue

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

please use following javascript to get selected radio button value
function GetSelectedRadi oOption(rbList)
{
var iIndex=0;
while(document. getElementById( rbList + '_' + iIndex))
{
if (document.getEl ementById(rbLis t + '_' + iIndex).checked )
{
var selected = document.getEle mentById(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.R adioButtonList. value.

What is the solution.
The DropDownList control is able to refer in javascript like
document.Form.D ropDownList.val ue

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 GetSelectedRadi oOption(rbList)
{
var iIndex=0;
while(document. getElementById( rbList + '_' + iIndex))
{
if (document.getEl ementById(rbLis t + '_' + iIndex).checked )
{
var selected = document.getEle mentById(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.R adioButtonList. value.

What is the solution.
The DropDownList control is able to refer in javascript like
document.Form.D ropDownList.val ue

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
8523
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 ListItem housed by the RadioButtonList; however, the rbl.Items.Attributes.Add( eventName, callFunction ) model does not work for this--I can only add attributes to the rbl object itself: Is there a built-in way to do this that I am missing (without...
6
7747
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 update the database. Here is the control containment hierarchy: ASP Page Static User Control // just provides a pretty border around
4
9653
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 with like a table layout and in the last column I want to have three radio buttons (for each row in repeater). The value of the radio button should be calculated from a value from the dataset. How can I do that? When I try to use a variable...
5
6980
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 RadioButtonList. An input to this procedure is the ID that is stored in the database. I want the radiobuttonlist to show the radiobutton with datavaluefield = savedID as checked when it is displayed.
2
4737
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 text string. My problem is that when i'm loading my form, it uses a repeater control for each user by the way, I can't find a way to assign either of these values to the RadioButtonList Control. I can read them from the database but i wan't the...
5
2686
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 running this in IE, behaviour is as I would expect it. If I select an item and do a postback, the page remembers my selection when reloading, and the SelectedIndex property of my control returns the correct value.
0
1427
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" runat="server" AutoGenerateColumns="False" DataKeyNames="Question_id" DataSourceID="SqlDataSource1"> <Columns> <asp:BoundField DataField="q_Description"
6
2637
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 in the page and I've got code to get the selected value from it in the Radiobuttonlist_SelectedIndexChanged event. The code in there is: Protected Sub rblFMSValue_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs)
13
10716
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 static controls. However I would like to move on to attempt to create some dynamic controls. So I set out to work with a radiobuttonlist questionnaire. I have a database and in that DB I have 2 tables one which holds the questions and the other...
0
8675
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8604
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9160
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9029
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8897
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8862
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5860
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4370
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
2331
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.