473,503 Members | 2,150 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

put focus on radio

Hi,
Is there a way to put focus on a form element of type radio or checkbox.
It only seems to work on input of type text...

Thanks in advance,
Anthony
Jul 23 '05 #1
1 1722
"Anthony" <an*****@notspecified.nl> wrote in message
news:41***********************@news.xs4all.nl...
Hi,
Is there a way to put focus on a form element of type radio or checkbox.
It only seems to work on input of type text...

Thanks in advance,
Anthony

A Google search on "JavaScript checkbox methods focus" would have given you
your answer:

http://www.devguru.com/Technologies/...ef/chkbox.html

http://www.devguru.com/Technologies/...ref/radio.html

<html>
<head>
<title>focus.htm</title>
</head>
<body>
<form name="form1">
<input type="radio" name="radio1" value="1">One
<input type="radio" name="radio1" value="2">Two
<br>
<input type="checkbox" name="check1" value="1">One
<input type="checkbox" name="check2" value="2">Two
<br>
<input type="button" value="radio"
onclick="document.form1.radio1[0].focus()">
<input type="button" value="checkbox"
onclick="document.form1.check1.focus()">
</form>
</body>
</html>
Jul 23 '05 #2

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

Similar topics

3
28213
by: Terry Murray | last post by:
Hi All: I would like to know how to set the focus on a radio button (if it is possible) I tried button.focus() but with no luck The reason that I need to do this is to validate a form. If...
2
5095
by: Mike Irwin | last post by:
I'd like to prevent a submit button from getting focus unless a particular textbox or radio button is selected. For example, if a user clicks anywhere within a form, the submit button is focused...
2
7718
by: Paul Thompson | last post by:
I am trying to use various javascript tools, all of which work in NN, to work in IE. Here's my latest annoyance. I get a list of all objects on a page using docContents =...
3
1616
by: MarsVoyager | last post by:
Hi, I want to change the value of a submit button when the onChange event is fired by a Radio Input. Problem is, it seems the value is modified in the gui only when the Radio Input looses focus,...
1
1494
by: Buddy | last post by:
Hello, When ever I call the Focus method of the radio button the Click event of the Radio button gets called, how can I either stop this happening or check in the Click event if the code that...
16
3610
by: Stuart | last post by:
I have a page where I utilise the left and right cursor keys to change an image, also on this page is a groups of radio buttons, unfortunately when a radio button is clicked the focus for the...
5
11617
by: Matt B | last post by:
I know this is a bit of nonstandard behavior, but I would like the Enter key to move focus through a group of radiobuttons without selecting them. The user would then have to use Space or actually...
1
5389
by: wtfxxx | last post by:
Hi i've a keyboard based UI that needs to give focus to a radio button but not select it until the user presses a key (Enter most likely). But unfortunately Focus and Selecting are bound...
5
2087
by: baskarpr | last post by:
Could somebody help me ? I have a left frame and right frame in a page. There is a form in right frame which has number of text box, checkbox, radio button, some static text's. For every input item...
0
7349
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...
0
7467
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
5594
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,...
1
5022
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...
0
4688
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...
0
3177
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
1521
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 ...
1
746
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
399
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.