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

click() question


I want to programatically force click a certain radio button named
"fourdp".

A click(fourdp) ; returns an undefined error.
What am I doing wrong?
--
Many thanks,

Don Lancaster
Synergetics 3860 West First Street Box 809 Thatcher, AZ 85552
voice: (928)428-4073 email: do*@tinaja.com fax 847-574-1462

Please visit my GURU's LAIR web site at http://www.tinaja.com

Jul 20 '05 #1
4 8282
> I want to programatically force click a certain radio button named
"fourdp".

A click(fourdp) ; returns an undefined error.
What am I doing wrong?


html objects are in a distinct space from JavaScript objects. You have to use an
accessor method like

document.getElementById('fourdp').click();

where fourdp is the id (not necessarily the name) of the element.

More hints here: http://www.crockford.com/#javascript

Jul 20 '05 #2
Douglas Crockford wrote:
I want to programatically force click a certain radio button named
"fourdp".

A click(fourdp) ; returns an undefined error.
What am I doing wrong?


html objects are in a distinct space from JavaScript objects. You have to use an
accessor method like

document.getElementById('fourdp').click();

where fourdp is the id (not necessarily the name) of the element.

More hints here: http://www.crockford.com/#javascript


If I try adding an ID="fourdp" etc to the radio buttons, the return
error message is

OBJECT DOESN'T SUPPORT THIS PROPERTY OR METHOD.

Can a radio button have an ID?
--
Many thanks,

Don Lancaster
Synergetics 3860 West First Street Box 809 Thatcher, AZ 85552
voice: (928)428-4073 email: do*@tinaja.com fax 847-574-1462

Please visit my GURU's LAIR web site at http://www.tinaja.com

Jul 20 '05 #3
> > > I want to programatically force click a certain radio button named
"fourdp".

A click(fourdp) ; returns an undefined error.
What am I doing wrong?


html objects are in a distinct space from JavaScript objects. You have to use an accessor method like

document.getElementById('fourdp').click();

where fourdp is the id (not necessarily the name) of the element.

More hints here: http://www.crockford.com/#javascript


If I try adding an ID="fourdp" etc to the radio buttons, the return
error message is

OBJECT DOESN'T SUPPORT THIS PROPERTY OR METHOD.

Can a radio button have an ID?


Sure they can. Make sure they each have a different id.

Jul 20 '05 #4
Douglas Crockford wrote:
> I want to programatically force click a certain radio button named
> "fourdp".
>
> A click(fourdp) ; returns an undefined error.
> What am I doing wrong?

html objects are in a distinct space from JavaScript objects. You have to use an accessor method like

document.getElementById('fourdp').click();

where fourdp is the id (not necessarily the name) of the element.

More hints here: http://www.crockford.com/#javascript


If I try adding an ID="fourdp" etc to the radio buttons, the return
error message is

OBJECT DOESN'T SUPPORT THIS PROPERTY OR METHOD.

Can a radio button have an ID?


Sure they can. Make sure they each have a different id.


Finally worked it out.

form.hominydp.fourdp.click() ;

apparently works properly
--
Many thanks,

Don Lancaster
Synergetics 3860 West First Street Box 809 Thatcher, AZ 85552
voice: (928)428-4073 email: do*@tinaja.com fax 847-574-1462

Please visit my GURU's LAIR web site at http://www.tinaja.com

Jul 20 '05 #5

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

Similar topics

2
by: Csaba2000 | last post by:
I'd like to be able to simulate a mouse click on an arbitrary HTML element (for the purpose of invoking whatever behaviour that element would have, had a real mouse click come to it) so that my...
6
by: JSjones | last post by:
Hi all, I'm new to these boards and my javascript experience is fairly limited and basic so please bear with me. Anyway, on to the question and some background. I'm developing using ColdFusion...
5
by: Al Christoph | last post by:
I have a program that mixes wizard like behavior with random access to the various dialogs in the wizard. I do this by having each step map to a toolstripmenuitem. Users can randomly choose the...
3
by: Scott Schade | last post by:
I have a form onto which I add a control during execution. The control is a control that I wrote. The control has a number of controls on it. I would like to click on a button on the control and...
41
by: JohnR | last post by:
In it's simplest form, assume that I have created a usercontrol, WSToolBarButton that contains a button. I would like to eventually create copies of WSToolBarButton dynamically at run time based...
0
by: Demetri | last post by:
I have created a web control that can be rendered as either a linkbutton or a button. It is a ConfirmButton control that allows a developer to force a user to confirm if they intended to click it...
15
by: Oleg Subachev | last post by:
I need to programmatically invoke from other class Click event of the Button on my Form. Button.OnClick method is protected, not public. How to perform this ? Oleg Subachev
1
by: tony | last post by:
Hello! If you drag a ListBox into a windowform and then right click on this ListBox and then chose property. When you have the properties up click on the flash symbol for seeing all the events...
4
by: LyzH | last post by:
Someone else had a question on how to emulate a mouse click. I tried posting in that thread but I have something of a twist on this problem and I'm really in trouble here! If I don't get help...
3
by: eddie69 | last post by:
Hi, Newbie question here: I am creating an application in VB Studio 2005 which reads the status of an USB PIR Motion sensor. So far, I have managed to get the application to read the motion...
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: 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
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
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
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.