Hadi S. wrote on 09 aug 2003 in comp.lang.javascript
:
i want to control the 'Enter' key to set focus to the next element in
the form(instead of 'Tab'). and i want to know which element had the
focus when the Keypress event of the form is called. how can i get
that?
<input id="myinput"
onkeydown="if (event.keyCode==13)
{alert(this.id);event.keyCode=9}">
IE6 tested, other browsers need another event handling.
Hadi, this will change the standard execution so many will object to that.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)