It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

News

Log In Sponsors
Partner Sites

Re: move focus... is it correct ?



IE and Other browser's detecting of keystrokes vary. IE is picky.

If you want to move the focus when the "enter" key is press, you can do it like this:
[code:lzkqna0t]
<input type="text" name="password2" size="15" onkeydown="var e = event || window.event; key = e.which?e.which:e.keyCode; if (key==13) document.getElementById('submitbutton').focus();">
[/code:lzkqna0t]

If you don't want your form to submit when the enter key is pressed, you can actually do it like this:
[code:lzkqna0t]
<input type="text" name="password2" size="15" onkeydown="var e = event || window.event; key = e.which?e.which:e.keyCode; if (key==13) {return false;}">
[/code:lzkqna0t]

Hope that makes sense.

Click here to read the whole forum topic