Organizational Research By

Surprising Reserch Topic

Experts Most Trusted Topic


change enter from submission to tab


change enter from submission to tab  using -'javascript,asp.net'

Users don't like the fact that the Enter key submits the page.  So I am tasked with preventing the submission and changing the Enter key to a Tab to the next field.

I have tried many javascript snippets found on the net but none have worked so far.  The only one that has even come close to having an effect was e.preventDefault() of the jQuery API, which stops the submit, but nothing I have tried emulates the tab behavior.

e.returnValue = false;
e.cancel = true;


Page still submits with the above in the keydown event handler.  Same effect with return false in the keydown event handler.  The handler is firing, tested by putting a breakpoint in it with firebug.

This needs to work with both IE and Firefox.

Don't say "don't do this".
1) I'm already convinced that I shouldn't do it, but it's not a choice that is mine, so the discussion is mute.
2) It would be an answer to the question "Should I do this?", which is not the question that I am asking.
    

asked Sep 29, 2015 by rajeshujade
0 votes
3 views



Related Hot Questions



Government Jobs Opening


...