essentially the script looks like this.

<script>
function goTab(next,max){
    len = event.srcElement.value.length
    if (len == max){
        eval("document.formname." + next + ".focus()");
    }
}
</script>
</head>

<body>
<form name="formname">
<input type="text" name="first" onkeypress="goTab('second',3)" size="3">
<input type="text" name="second" size="2">
</form>

----- Original Message -----
From: "Sheeran, Jean" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, May 01, 2001 9:46 AM
Subject: [KCFusion] JavaScript question


> I have an area of my form that is set up for a date entry as follows:
>
> __/__/__
> mm dd yy
>
> I would like to use JavaScript (or something better) to detect when 2
> characters have been entered into the 'mm' field, and then to set focus to
> the 'dd' field.  (then the same for the dd-> yy field)  Essentially to the
> end user, it is as simple as just typing a string of 6 characters instead
of
> having to 'Tab' through or click the next field.  How does one achieve
this?
>
>
> ______________________________________________________________________
> The KCFusion.org list and website is hosted by Humankind Systems, Inc.
> List Archives........ http://www.mail-archive.com/cf-list@kcfusion.org
> Questions, Comments or Glowing Praise.. mailto:[EMAIL PROTECTED]
> To Subscribe.................... mailto:[EMAIL PROTECTED]
> To Unsubscribe................ mailto:[EMAIL PROTECTED]
>
>

 
 
______________________________________________________________________
The KCFusion.org list and website is hosted by Humankind Systems, Inc.
List Archives........ http://www.mail-archive.com/cf-list@kcfusion.org
Questions, Comments or Glowing Praise.. mailto:[EMAIL PROTECTED]
To Subscribe.................... mailto:[EMAIL PROTECTED]
To Unsubscribe................ mailto:[EMAIL PROTECTED]
 

Reply via email to