PDA

View Full Version : wrap the output to next text field when reaching the maxlength of the text field - ur


therry
06-29-2002, 05:20 AM
Hi,

If I want to auto wrap the word to next input text field so that when reaching the maxlength of the input text field the word will be wrap to next input text field.

Can it be done using Javascript ?

therry
07-01-2002, 08:52 AM
the code that you gave in your page is working but I need one more thing. I need to wrap the whole word to next text field when it reaches the max length. since now when I type anything & when it reaches the max length, it will still go to next text field automatically but it didn't wrap the whole word to next text field.

Do you know how to do it?

joh6nn
07-01-2002, 08:56 AM
i'm thinking that you'd have to split the value of the text-box at every space, take the last value of the array, and then set the value of the next text-box as that last array value, plus whatever wrapped over to the new box, and then re-join the array to be the value of the first text box.

i'll let Dave give you his answer, though, since it's his code.

therry
07-02-2002, 01:50 AM
thanks Dave. It's working fine now...:)