<script language="JavaScript"> function oFocus(){ if(len(this.myform.s1.value) == 3) { this.myform.s2.focus(); } } function oFocus1(){ if(len(this.myform.s2.value) == 2) { this.myform.s3.focus(); } } </script> <body> <form id="myform"> <asp:input onchange="javascript:cFocus()" type="textbox" id="s1" maxlength=3 /> <asp:input onchange="javascript:cFocus1()" type="textbox" id="s2" maxlength=2 /> <asp:input type="textbox" id="s3" maxlength=4 /> </form> </body>You can optimize the script some more but you get the general idea. I hope my syntax is correct!