File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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: 15376
    
    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: 15376
    
    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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: html navigation using arrows