Tags: asp, auto-tab, code, example, forms, net, number, script, telephone, textboxes, time-consuming, web
Auto-tab in textboxes
This may be a simple question but for me it is time-consuming to look for ASP.NET code/script for the telephone number textboxes.
Leave a comment...
- 8 Comments
- Thanks, optik. That is what I still believe client side checks the input right away rather than going to the server side to waste time and performance.#2; Fri, 04 Jan 2008 08:57:00 GMT
I am interesting in this solution. Do you have the code to do this? Thanks#3; Fri, 04 Jan 2008 08:59:00 GMT
- Hi !!!
Thanks for reply!!!
OK, that is fine , can i have code and could you tell me where did you place it?#4; Fri, 04 Jan 2008 09:00:00 GMT
Jan#5; Fri, 04 Jan 2008 09:00:00 GMT
OR use this below:
Simply insert the below in the <body> section of your page:
This credit MUST stay intact for use
Below this code must be after <BODY
Enter your 10-digit phone number:
<input type="text" name="first" size=4 onKeyup="autotab(this, document.sampleform.second)" maxlength=3> <input type="text" name="second" size=4 onKeyup="autotab(this, document.sampleform.third)" maxlength=3> <input type="text" name="third" size=5 maxlength=4
As shown in the sample form, the key to adding auto tabbling to a form field is through the code in red:
<input type="text" name="first" size=4 onKeyup="autotab(this, document.sampleform.second)" maxlength=3
Change "document.sampleform.second" to reference the field to auto tab to, and "maxlength" to specify the source field's character limit.#6; Fri, 04 Jan 2008 09:02:00 GMT
- Hi !!
Thank you for your reply put can i ask one question!!!
Is is possible to approach the same behaviour when using asp:TextBox (server control) rather than input (html control)#7; Fri, 04 Jan 2008 09:03:00 GMT
- You can try ! I think it is possible.
Jan#8; Fri, 04 Jan 2008 09:04:00 GMT