aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Tab Key and Radio buttons Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Tab Key and Radio buttons" Watch "Tab Key and Radio buttons" New topic
Author

Tab Key and Radio buttons

Anthea Blake
Greenhorn

Joined: Apr 18, 2002
Posts: 22
Hi,
I have a radio button group that has four items.
I would like the page to function so that when i use the "tab" key on the keyboard, the user should be able to tab to each individual option. Currently the tab button treats all the radio buttons as a group so it only goes to the first option, and then skips to the next item (textbox etc..) on the form.
Does anyone know of a way that I can make the tab button go to each individual radio box option. I know that the other way is to separate each radio box item as an individual item, but the user is only allowed to select one of the items, which is why it is set up as a group. Another way is to create a javascript function that ensures that only one item is selected, but if there is a shorter way, it would be better.
Any help is greatly appreciated.
Thanks,
Anthea
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Well then your web app would be confusing because it would function differently than every other web app in the world. The user navigates the options in the button group using the arrow keys. You can use the space bar to select an option and then tab to the next control. Are you really certain you want to create a web control that doesn't behave the way the whole world will expect it to?
Anthea Blake
Greenhorn

Joined: Apr 18, 2002
Posts: 22
Hi,
That was my exact question when I was given the task. But seeing that in this world, we also have clients who thrive on wantings things that they can't have, we are expected to create little inventions in order to give them what they want.
Anyways, I wrote a javascript function to accomplish this.
Thanks,
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Yeah, clients suck. Too bad they are the ones paying for everything, or I would just get rid of them and we could develop some really cool stuff!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Tab Key and Radio buttons