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
Slip Covers
System Protection. network security. Internet security. Not expensive.

ThatBigForum

move focus... is it correct ?



Hello,

i would like to know if this is the correct way to move the focus from a field to a button in order to avoid refreshing the page when the enter key is pressed. (It works on Safari.. but I've just realized it doesn't work on Firefox and IE.

[code:1pfj9538]<form name="password1" onsubmit="javascript:submitentry()">
<input type="text" name="password2" size="15" onkeydown="if (window.event.keyCode==13) javascript:document.getElementById('submitbutton').focus()"><br>
<input type="button" class="normaltexte" value="Submit" id="submitbutton" onClick="submitentry()">
</form>[/code:1pfj9538]

thanks

Click here to read the whole forum topic