473,473 Members | 2,158 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

accessing selectIndex property

I am using the animation extender in asp.net ajax and have a RadioButtonList
in a div and access it in javascript through the extender.

The object passed into the javascript function is definitely the
RadioButtonList but I can not seem to get to the selectIndex property.

When I do a Object.id it does however give me the correct name of the
RadioButtonList id name.

Just not sure of the syntax to get at the selectIndex property

thanks
Feb 2 '07 #1
2 1156
a radiolist is just a span or table (depending on style) with radio
buttons in it. the id refers to the span/table, not the buttons. to get
the selected index, you get the span/table by id, walk its children
nodes (may need to recurse) looking for radio buttons (tagname=="INPUT"
type=="radio"). count the buttons until you find a checked one. that is
the index. to get the value instead of the index (more useful in
javascript) get the value of the checked one.

-- bruce (sqlwork.com)
barry wrote:
I am using the animation extender in asp.net ajax and have a RadioButtonList
in a div and access it in javascript through the extender.

The object passed into the javascript function is definitely the
RadioButtonList but I can not seem to get to the selectIndex property.

When I do a Object.id it does however give me the correct name of the
RadioButtonList id name.

Just not sure of the syntax to get at the selectIndex property

thanks

Feb 2 '07 #2
thank you

"bruce barker" <no****@nospam.comwrote in message
news:ec**************@TK2MSFTNGP06.phx.gbl...
>a radiolist is just a span or table (depending on style) with radio buttons
in it. the id refers to the span/table, not the buttons. to get the
selected index, you get the span/table by id, walk its children nodes (may
need to recurse) looking for radio buttons (tagname=="INPUT"
type=="radio"). count the buttons until you find a checked one. that is the
index. to get the value instead of the index (more useful in javascript)
get the value of the checked one.

-- bruce (sqlwork.com)
barry wrote:
>I am using the animation extender in asp.net ajax and have a
RadioButtonList in a div and access it in javascript through the
extender.

The object passed into the javascript function is definitely the
RadioButtonList but I can not seem to get to the selectIndex property.

When I do a Object.id it does however give me the correct name of the
RadioButtonList id name.

Just not sure of the syntax to get at the selectIndex property

thanks

Feb 2 '07 #3

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

Similar topics

0
by: | last post by:
Hello All, Simple question, how do you tell the DataGrid.selectIndex to return the value in column 2?
1
by: Jason Bell | last post by:
Every example of properties I've seen have used simple types such as integers and strings. Here's the scenario I'm trying to work out (3D graphics programming): I have a class called...
3
by: Vivek Sharma | last post by:
Hi, I have created a dropdownlist as a web user control. I am using its multiple instances on the webpage. How do I access the selectedValue of each instance? All the instances have different...
6
by: DKode | last post by:
Ok, kind of a silly question I just want to know what the proper method is, When I have local Properties, ie: private bool _someVal; public bool SomeVal { get { return _someVal; } }
1
by: tmaster | last post by:
Within a class, can I create a property that is a listview? Here's what I tried, but it doesn't seem to work: '------------ create property to give the second form access to the first form's...
5
by: TS | last post by:
is it preferred to access member variables directly in code, on the page that declared them, versus going thru a property accessor? I would think that since theres no security concerns or anything...
4
by: John | last post by:
I am having a problem accessing the members in a structure via an interface and Class. ***Development Code*** Structure Person Public Name as String End Structure Interface IData Public...
4
by: nottarealaddress | last post by:
I'm trying to get my feet wet in VB2005 (our new standard at work after officially stopping new development in VB6 about a month ago). I'm working with a simple sql 2005 table of 50 entries, one...
1
by: nsphelt | last post by:
I am wondering if it is possible to access the underlying property of a base class within a derived that has overridden that property. I am using VB.NET and when I use the MyBase keyword to access...
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
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,...
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...
1
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...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.