473,387 Members | 3,787 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,387 software developers and data experts.

asp:RadioButtonList

I have below.

<asp:RadioButtonList ID="rblConfirm" runat="server">

<asp:listitem value="Yes">Yes</asp:listitem>

<asp:listitem value="No">No</asp:listitem>

</asp:RadioButtonList>

In my codebehind I have
rblConfirm.Attributes["onclick"] = "javascript:EnableIndependentValues(this)";

How do I get the selected value in my Javascript?

Also why does onchange not work?

Apr 16 '07 #1
1 1575
the radio button list is table or span (depending on layout) with radio
buttons inside. a table or span does not have a onchange event.

to get the value you need recurse thru the childNodes looking for radio
buttons. then test the checked property.

-- bruce (sqlwork.com)
C wrote:
I have below.

<asp:RadioButtonList ID="rblConfirm" runat="server">

<asp:listitem value="Yes">Yes</asp:listitem>

<asp:listitem value="No">No</asp:listitem>

</asp:RadioButtonList>

In my codebehind I have
rblConfirm.Attributes["onclick"] = "javascript:EnableIndependentValues(this)";

How do I get the selected value in my Javascript?

Also why does onchange not work?
Apr 16 '07 #2

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

Similar topics

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...
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: Utada P.W. SIU | last post by:
<asp:RadioButtonList></asp:RadioButtonList> only allow create a vertical radion button list how can I use it to create a horizatial radio button list? thanks~
2
by: darrel | last post by:
I'm using some standard HTML radio buttons (to allow finer javascript interaction) on a web page and would like to catch the selected item on postback. Since they are all ID's uniquely, is there a...
1
by: Shapper | last post by:
Hello, I have an Asp:radiobuttonlist with its items and values. I also have a button which when clicked runs the function Show_Results. How can I access the value selected in my...
1
by: Chris Kettenbach | last post by:
Good Afternoon Everyone, Is there any way to set the font of the listitems inside a radiobutton list? I have tried spans, tds, and tables and I can seem to get it to work. The html redered by...
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...
0
by: =?Utf-8?B?Qw==?= | last post by:
I have below. <asp:RadioButtonList ID="rblConfirm" runat="server"> <asp:listitem value="Yes">Yes</asp:listitem> <asp:listitem value="No">No</asp:listitem> </asp:RadioButtonList>
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: 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: 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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...
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.