Solved

Auto Tab coding on ASP.Net web form does not tab on Social Security Number

Posted on 2012-03-29
2
370 Views
Last Modified: 2012-03-29
Hi Everyone,

I have attached some javscript coding.  The computer is not tabbing when the first three numbers are entered for SSN1.
ContentMasterRevised.doc
RevisedContentPageCoding.doc
0
Comment
Question by:jjc9809
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 7

Accepted Solution

by:
Lalit Chandra earned 500 total points
ID: 37784092
hi
Everything is write in your Master page & content page code.
you have to do only little thing on the Content page. Just replace whole script section of the content page ( which is written in the last section) with the following script


    <script type="text/javascript" language="javascript">
        $(function () {
            var $SSN1_ch = $("input[id*='SSN1_ch']");
            var $SSN2_ch = $("input[id*='SSN2_ch']");
            var $SSN3_ch = $("input[id*='SSN3_ch']");

            $SSN1_ch.keyup(function (e) {
                if ($(this).val().length == parseInt($(this).attr("maxlength"))) {
                    $SSN2_ch.focus();
                }
            }).bind('keypress', function (e) {
                if ((e.keyCode ? e.keyCode : e.which) == "13") {
                    $SSN2_ch.focus();
                    e.preventDefault();
                }
            });
            $SSN2_ch.keyup(function (e) {
 
                if ($(this).val().length == parseInt($(this).attr("maxlength"))) {
                    $SSN3_ch.focus();
                }
            }).bind('keypress', function (e) {
                if ((e.keyCode ? e.keyCode : e.which) == "13") {
                    $SSN3_ch.focus();
                    e.preventDefault();
                }
            });
            $SSN3_ch.keyup(function (e) {
                if ($(this).val().length == parseInt($(this).attr("maxlength"))) {
                    $(this).nextAll('input:first').focus();
                }
            }).bind('keypress', function (e) {
                if ((e.keyCode ? e.keyCode : e.which) == "13") {
                    $(this).nextAll('input:first').focus();
                    e.preventDefault();
                }
            });

        });
    </script>

I have tested on my end. and it 's running accourding to your aspectation i.e, automatic tab when max digit has been entered and also automatic tab on Enter. I have tested only on the

SSN1_ch
SSN2_ch
SSN3_ch

textboxex.

Hope this will solve all of your query.
0
 

Author Closing Comment

by:jjc9809
ID: 37784482
Lalit Chandra,

Thanks, I got it to work! I will go ahead and close out the post and award you some more points.  Very pleased.

jjc9809
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

689 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question