Another TextField jump : TextField : Form Control JAVASCRIPT DHTML TUTORIALS


JAVASCRIPT DHTML TUTORIALS » Form Control » TextField »

 

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)")&nbsp;
<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>




           
       



-

Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

JAVASCRIPT DHTML TUTORIALS

 Navioo Form Control
» TextField