Page 1 of 1
move the cursor upon completion of the first 2 boxes.
Posted: Thu Feb 12, 2009 12:58 am
by mit
Hi;Situation is like this;
I have 3 text field for entering serial number, first one ,2 digit , second one 4 digit and last one 5 digit.
I need after inserting 2 digits in first field ,cursor goes to second field and so on ... how can i do this?
Re: move the cursor upon completion of the first 2 boxes.
Posted: Thu Feb 12, 2009 12:59 am
by mit
I meant tab goes to other field after completing of each field.thx
Re: move the cursor upon completion of the first 2 boxes.
Posted: Thu Feb 12, 2009 1:07 am
by Christopher
Please no double posting.
You can edit your own posts by clicking on the EDIT button at the lower right of the post.
Re: move the cursor upon completion of the first 2 boxes.
Posted: Thu Feb 12, 2009 1:10 am
by requinix
There's a property called "tabindex". First Google result got me
this page.
Re: move the cursor upon completion of the first 2 boxes.
Posted: Thu Feb 12, 2009 1:19 am
by mit
when the current form element's maxlength has been reached. the user does not have to manually click in or tab to the next field and it goes by auto
Re: move the cursor upon completion of the first 2 boxes.
Posted: Thu Feb 12, 2009 1:39 am
by requinix
So what did you mean when you said
mit wrote:I meant tab goes to other field after completing of each field.thx
Use JavaScript, the onchange event, the value property, and the .length property of strings to find out how long the input is. Then the .focus() method to change focus to the next field.