I am having a file upload control in my page and when i run the application and try to navigate to the file upload control by pressing the tab key. When the focus is on the Browse button and if i hit the enter button the file browse window is not opening.It just moves the focus to the next control.Please help.
Replication steps:
1) Add a file upload contol in a web page
2) add a button in the same page
3) run the application and try to use tab key to navigate to the browse button in the file upload button control
4) press the enter button
5) the control will move to the next button.
Regards,
Jebli.
What’s happening is that your browser interprets the ENTER keypress as a request to submit the form. You need to intercept and override this in javascript. See:
http://bytes.com/groups/javascript/644728-file-upload-change-key-code-enter-key-browse-button