this is what i found and it works.
Code:
<script language="javascript" type="text/javascript">
// <!CDATA[
function Tab(currentField, nextField)
{
// Determine if the current field's max length has been reached.
if (currentField.value.length == currentField.maxLength)
{
// Retreive the next field in the tab sequence, and give it the focus.
document.getElementById(nextField).focus();
}
}
// ]]>
</script>
Code:
<tr>
<td style="width: 83px; height: 33px;">
<asp:TextBox ID="TextBoxPhoneOne" runat="server" Width="40px" onkeypress="Tab(this, 'TextBoxPhoneTwo');" MaxLength="3"></asp:TextBox></td>
<td style="width: 100px; height: 33px;">
<asp:TextBox ID="TextBoxPhoneTwo" runat="server" Width="27px" onkeypress="Tab(this, 'TextBoxPhoneThree');" MaxLength="3"></asp:TextBox>
</td>
<td style="width: 100px; height: 33px;">
<asp:TextBox ID="TextBoxPhoneThree" runat="server" Width="54px" MaxLength="4"></asp:TextBox></td>
</tr>