Another TextField jump
<html><HEAD><TITLE>Jump Fields Demo</TITLE>
<script language=javascript>
<!--
function checklength(nextfield,chars,currfield) {
x= document.phone[currfield].value.length
if (x == chars) {
eval('document.phone.' + nextfield + '.focus();');
}
}
//-->
</SCRIPT>
</HEAD>
<BODY>
<FORM name=phone>
( <INPUT value="" name=areacode maxlength="3" size="3" onkeyup="checklength('prefix',3,this.name)"> )
<INPUT value="" name=prefix maxlength="3" size="3" onkeyup="checklength('suffix',3,this.name)"> -
<INPUT value="" name=suffix maxlength="4" size="4">
</FORM></BODY></HTML>
Related examples in the same category