473,792 Members | 2,796 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Radio Button and focus

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 cursor keys goes to the radio
buttons and any subsequent cursor key presses scroll through the radio
buttons.

How do I take focus away from the radio buttons after they have been clicked
?
Dec 20 '05
16 3672

"Thomas 'PointedEars' Lahn" <Po*********@we b.de> wrote in message
news:54******** ********@Pointe dEars.de...
Stuart wrote:
"Thomas 'PointedEars' Lahn"
Well, you crippling your own keyboard navigation deliberately certainly
strikes me as being an issue ...


What navigation is there to do on that page other than scroll through the
images? Personally I can,t think of a better way of viewing these images
than to use the cursor keys!


Read again. With blur() you are _preventing_ yourself from using the
cursor keys again (or require yourself to tab back). You are looking
for focus()ing another control onclick or for another UI approach.
PointedEars


I have never suggested blurring anything
Dec 20 '05 #11
Stuart wrote:
"Thomas 'PointedEars' Lahn" <Po*********@we b.de> wrote [...]
Stuart wrote:
"Thomas 'PointedEars' Lahn"
Well, you crippling your own keyboard navigation deliberately certainly
strikes me as being an issue ...
What navigation is there to do on that page other than scroll through
the images? Personally I can,t think of a better way of viewing these
images than to use the cursor keys!

Read again. With blur() you are _preventing_ yourself from using the
cursor keys again (or require yourself to tab back). You are looking
for focus()ing another control onclick or for another UI approach.
[...]


I have never suggested blurring anything


True, however

,-[news:11******** *************@g 44g2000cwa.goog legroups.com]
| You can use the blur method.

,-[news:43******** *************** @per-qv1-newsreader-01.iinet.net.au]
| > How do I take focus away from the radio buttons after they have been
| > clicked ?
| Not everyone navigates with a mouse, or even has a mouse.

But, with the "page in question" you provided, the logical design
choice is indeed either to use the blur() method of the radio button
on click. I quick-tested that with

javascript:aler t(document.getE lementsByName(" int")[0].onclick=functi on()
{ this.blur(); })
and
javascript:aler t(document.getE lementsByName(" int")[1].onclick=functi on()
{ this.blur(); })

However, this way users (you) will have to tab-navigate back to the
radio button and can only do one change with the up/down keys.

So you might want to consider the alternative of providing Left/Right
buttons for navigation that gain focus after a selection, applying the
focus() method on the respective element object. The cursor keys can
still be used to trigger either button, so no functionality would be
lost or duplicated.

But please, stop abusing tables and start using forms properly; there
is the `fieldset' element which you can also use for handling the
bubbling `click' event. Valid markup would be an advantage, too.

<URL:http://validator.w3.or g/>

And, last but not least, you might want to consider using an existing
sender address as you will receive no more help from me otherwise, not
considering that you are already running the risk of losing your account
anyway.

<URL:http://www.interhack.n et/pubs/munging-harmful/>
<URL:http://www.cw.com/legal/acceptable_use_ policy.html>
HTH

PointedEars
Dec 21 '05 #12
Thomas 'PointedEars' Lahn said the following on 12/20/2005 7:24 PM:
Stuart wrote:
<snip>
And, last but not least, you might want to consider using an existing
sender address as you will receive no more help from me otherwise, not
considering that you are already running the risk of losing your account
anyway.


Someday, you might actually wake up to Reality and realize that your
empty threats at losing an account are as worthless as trying to pole
vault over the moon.

<snipped useless URL's>

--
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Dec 21 '05 #13

"Stuart" <ff**@hhhde.khr > wrote in message
Fitted this in and its all working how I want it to, many thanks....
Definatly being lazy now, How do I assign the up and down arrow keys to
scroll through the "grp" radio buttons.


messed about, and got it to work in a fashion.

Have I went about disabling the scroll down with the down key in the correct
way! I got confused with this, its working (IE5) but not too sure how!

the image changes all work on the cursor keys!
remember this is only intended for my use, so I havnt tried for browser
compatability!

Dec 22 '05 #14

"Thomas 'PointedEars' Lahn" <Po*********@we b.de>

And, last but not least, you might want to consider using an existing
sender address as you will receive no more help from me otherwise
But you have not provided any help !!!!!

take a look at the posts by robG & web.dev, that is help, your post in
contrast are irritating pedantic drivel!

, not
considering that you are already running the risk of losing your account
anyway.


yawn
Dec 22 '05 #15
Stuart wrote:
"Thomas 'PointedEars' Lahn" <Po*********@we b.de>
And, last but not least, you might want to consider using an existing
sender address as you will receive no more help from me otherwise


But you have not provided any help !!!!!


If you just learned to read and understand ...
PointedEars
--
"And all those exclamation marks, you notice? Five? A sure sign of
someone who wears his underpants on his head."
-- Terry Pratchett in "Maskerade"
Dec 22 '05 #16
Thomas 'PointedEars' Lahn said the following on 12/22/2005 8:52 AM:
Stuart wrote:

"Thomas 'PointedEars' Lahn" <Po*********@we b.de>
And, last but not least, you might want to consider using an existing
sender address as you will receive no more help from me otherwise


But you have not provided any help !!!!!

If you just learned to read and understand ...


And if we could only get YOU to read and understand.....

--
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Dec 22 '05 #17

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

Similar topics

1
1594
by: Matt | last post by:
The following code is try to validate if the user selects a radio button choice. I dont understand why document.UserInputs.question.value; gets undefined value even user make a choice. I tried text box and drop down list, and it works fine. <html> <head> <script type="text/javascript"> function CheckForm()
3
28293
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 the user does not select a radio button I would like my validation code to set the focus at the first radio button within the pair that was not selected that way
1
8766
by: Michael Albanese | last post by:
I am developing an application to handle my compay's OSHA reporting requirements. Some of the input criteria are technical and narowly defined, so I was trying to prvide what i call "Context Sensitive Help" by providing a short instructional message based on which control has Focus. Because of the way that a Radio Button List control is rendered in the browser i can not attach an onFocus event
2
3494
by: NishSF | last post by:
Would anyone have any suggestions/javascript code so that if one clicks the Radio Button "Yes" below he has the option of selecting any of the six CheckBox below. If the user clicks on Radio Button "No", he should not have the option of clicking on any of the six checkboxes. See Code attached. Thank you so much in advance for your help as I can't get to make this combo work. <p>Did you have any problems finding any of the information...
1
24749
by: s.chelliah | last post by:
Hi, I am trying to use javascript, div tag and radio button to disable/enable a text box. It works fine in netscape and firefox, but in IE, the text box is not disabled when the user checks the radio button. Note that I am using two div statements. Any other solutions also wellcome. <html>
0
2760
by: ballamber | last post by:
This is a solution to the problem. Works with .NET 2.0. So the problem is displaying a data bound read-only checkbox or radio button in a GridView without actually disabling those controls. I assume you know what templates are in a GridView. Examples are in VB.NET. Sorry... So as a first step create a function in the page's underlying class that returns the string "checked" based on the bound data. Here's what I did. The underlying data...
1
3360
by: FunkHouse9 | last post by:
I'm trying to develop an order page and in one section, the customer specifies a shipment type using radio buttons that is submitted to the shopping cart. There are 4 buttons. If either of the first two are selected, the form should submit the data. If either of the last two are selected, I want the form to require input on a text field to collect an account number (op40_LabelShip). I have gotten the form to require the field, but it...
3
2851
by: jahphill | last post by:
Hey. I thought id make a seperate discusion because the other became a bit lengthy and confusing. Aim: Create a php file which works with the script below, which makes the radiobuttons work =D Right, when say mp3 radio button is selected, and say BLA is typed in the text box. I would like it to open up...
1
2157
by: sososm | last post by:
Hy experts I need a little help here. Can anybody tell me how to select a radio button from another program knowing the name,id or text of the radio button. I want to automate internet explorer by checking the "First Name" radio button then pressing the "Send" button. This is the code I'm using to get the focus to internet explorer: using System;
0
9670
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
9518
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,...
1
10159
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
10000
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...
1
7538
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6776
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
5436
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...
0
5560
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3719
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.