wood burning stoves 2.0*
The moose likes HTML, CSS and JavaScript and the fly likes File input browse button and keyboard support 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 "File input browse button and keyboard support" Watch "File input browse button and keyboard support" New topic
Author

File input browse button and keyboard support

Gaurav Singh
Greenhorn

Joined: Jan 03, 2004
Posts: 7
Hi,

I have a File Input field on my HTML form.

Now, if I am using only the keyboard, I can tab on to put focus on the browse button, but when I press enter to open the Browse dialog (on IE 6.0) it submits the form. If I hit space here, it results in opening of Browse dialog.
I tried the same on Firefox. Here pressing enter key results in the browse dialog to be opened.

Can anybody suggest as to how I can configure it to open the browse dialog when enter key is pressed in IE.

Thanks
Gaurav
Divya Guttikonda
Ranch Hand

Joined: Mar 09, 2005
Posts: 47
Try creating a dummy form with a single hidden field.Not sure if this works but just a suggestion.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: File input browse button and keyboard support
 
Similar Threads
focus
How to set Default button in Swing
Uploading files
Access Denied When Submitting File Upload
regarding enabling enter key on input type of file