...

View Full Version : autotab



bpaulsen2000
07-27-2002, 08:33 PM
hi,

there has to be a few thousand of these scripts around.

need to simply advance to next field after completion of field.

thx.

Bob P.

Mrs G
07-28-2002, 02:13 PM
Here's a script for you to play around with.


<script language="JavaScript">
<!--
function advance(currentField,nextField) {
if (currentField.value.length == 3)
document.myForm[nextField].select();
//else currentField.select();
}
//-->
</script>

<form name="myForm">
<input type="text" name="t1" maxlength="3" size="3" onclick="select()" onKeyUp="advance(t1,'t2')">
<input type="text" name="t2" maxlength="3" size="3" onclick="select()" onKeyUp="advance(t2,'t3')">
<input type="text" name="t3" maxlength="3" size="3" onclick="select()" onKeyUp="advance(t3,'t4')">
<input type="text" name="t4" maxlength="3" size="3" onclick="select()" >
</form>

bpaulsen2000
07-29-2002, 05:25 AM
hi,

thx. works fine.

B.P.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum