tags:

views:

28

answers:

2

Hi,

I'm trying to do something but I'm not sure what it's called or what I should be looking for.

I want to do it in jquery.

Basically when you're in an input box, if the user enters a character I want the caret to automatically jump to the next input box. Banks usually have it.

What class does this or what should I be looking for?

Thanks for any help.

A: 

do you want to know about "on change" ?

Richa
This is a comment, not an answer.
Sjoerd
but may be this will be answer of the question .. as this question have "I'm not sure what it's called or what I should be looking for." ;)
Richa
+4  A: 

Go to next input box after 5th character is entered:

$('#in1').keyup(function() {
    if ($('#in1').val().length > 4) {
        $('#in2').focus();
    }
});
Sjoerd
@Sjoerd: +1, I think that's what he is looking for.
Sarfraz
Just don't forget about the arrow keys - that's why I used `keypress` in my (now deleted) answer. There's nothing worse than pressing a non-alphanumeric key in an input box and the bloody thing moving focus to the next one.
Andy E