|
|
Weather in Tulsa, OK (74133)

|
Current Conditions:
|
 |
77°F
Fair
|
|
Wind: CALM calm mph
|
|
SAT 9/4
 H:85 L:55
| SUN 9/5
 H:89 L:64
| MON 9/6
 H:93 L:69
| TUE 9/7
 H:87 L:68
|
|

Last Update: 4:55:49 PM
|
weather.com
|
|
Services
|
|
|
|
|
Welcome to Terranet Technologies forum. This is a private Web Service so it
will require you to create a seperate account other than your Terranet account.
Please use your existing Terranet user name. It will only require your email and a password to join. |
|
|
|
|
|
|
|
|
ASP.Net and javascript tabbing
Posted: 18 Mar 07 9:18 AM
|
Hello all,
I am looking for a way in my asp.net 2.0 application to auto tab when typing in things like phone number and just automatically going to the next required field. |
|
|
|
Re: ASP.Net and javascript tabbing
Posted: 18 Mar 07 10:56 AM
|
First put this script in the <head> section
<script> function autoTab(element, nextElement) { if (element.value.length == element.maxLength && nextElement != null) { element.form.elements[nextElement].focus(); } } </script>
Next add the following keyup command in your textbox html:
<asp:TextBox ID="txtPt1" runat="server" MaxLength="3" onkeyup="autoTab(this,'txtPt2');" Width="27px"> <asp:TextBox ID="txtPt2" runat="server" MaxLength="3" onkeyup="autoTab(this,'txtPt3');" Width="27px"> <asp:TextBox ID="txtPt3" runat="server" MaxLength="4" onkeyup="autoTab(this,'txtPt1');" Width="39px">
The above html work as: When your enter your area code (txtPt1) it will auto tab the next textbox txtPt2. when you enter the prefix it will auto tab to the the last txtPt3. After entering the 4 digit number it will go back to the first text box txtPt1.
In ASP.Net 2.0 it will tell you that onkeyup is not valid for asp:textbox but it still will work.
Any questions let me know.
|
|
|
|
|
|