This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes html navigation using arrows Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "html navigation using arrows" Watch "html navigation using arrows" New topic
Author

html navigation using arrows

Pranav Sharma
Ranch Hand

Joined: Oct 27, 2003
Posts: 258
just wanted to know if
1) Is it possible to code so as to navigate through a html page using using the 'arrow' keys. Like the 'tab' button except it would go back also.

2)If yes, what would i have to do for this. (Don't need the details)

Thanks
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15385
    
    6
shift-tab goes back if you did not know that. You want to go from form element to element?

Problems may be what if the user wants to move the cursor in the textbox to change his message. It would not do what the user wants.

Eric
Pranav Sharma
Ranch Hand

Joined: Oct 27, 2003
Posts: 258
thanks eric

actually was asked by the client if it was feasible to do this, but I was thinking of similar problems that may occur.

thanks
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15385
    
    6
It is possible to do it. All you would have to do is have a key listener on the page and detect the arrow keys. Have a little function that determines the next field and focus it.

When I look at the UI, I do not want to change the way it works for the user unless it makes sense. Most people know tab to change form fields,alt w/ arrows to move through history, f5 to refresh, and so on. It may help one person and really screw with the other 100 users.

My 2 cents.

If they really want it, I can help you come up with the code. It is only a few lines long if all of the elements have a tab index on them.

Eric
 
Have you checked out Aspose?
 
subject: html navigation using arrows
 
jQuery in Action, 3rd edition