Copy content from textarea to input and trim characters
First time here :)

I have a textarea and an input and I would like that, when something is typed into the texarea, it copies it to the input onkeypress. But the input must be limited to 10 characters. Then I would like to add 5 numbers to the end of the value of the input

EG:
Textarea content: "Hello world, how are you?"
Input content: "Hello worl12345"

I have tried this http://jsfiddle.net/bxHQ5/ and this http://jsfiddle.net/4kS65/523/
but on the second one I think its really messed up code and requires some "cleaning". Besides, it lacks the function of adding 5 numbers at the end.

BTW, I am using jQuery

Any help is really appreciated!
Copy content from textarea to input and trim characters
===

First time here :)

I have a textarea and an input and I would like that, when something is typed into the texarea, it copies it to the input onkeypress. But the input must be limited to 10 characters. Then I would like to add 5 numbers to the end of the value of the input

EG:
Textarea content: "Hello world, how are you?"
Input content: "Hello worl12345"

I have tried this http://jsfiddle.net/bxHQ5/ and this http://jsfiddle.net/4kS65/523/
but on the second one I think its really messed up code and requires some "cleaning". Besides, it lacks the function of adding 5 numbers at the end.

BTW, I am using jQuery

Any help is really appreciated!