hi to everyone im very new in this thing.
why this code wont work?
whats wrong w/ it?
what i want to achieve is when i hit the enter key it will get focus to another textbox..
thanks in advance guys..PHP Code:<form>
<input type="textbox" name="textbox1" onkeypress="keydown(event)" >
<input type="textbox" name="textbox2">
</form>
<script>
function keydown(e){
if (!e) var e = window.event;
if (e.keyCode) code = e.keyCode;
else if (e.which) code = e.which;
if (code==13){
textbox2.focus();
}
}
</script>
more power![]()




Reply With Quote