jquery - add to hidden input field on keypress?

Posted by Simpson88Keys on Stack Overflow See other posts from Stack Overflow or by Simpson88Keys
Published on 2010-06-18T05:47:31Z Indexed on 2010/06/18 5:53 UTC
Read the original article Hit count: 268

Filed under:
|
|

I've got a hidden input field that I want to append text to depending upon what a user enters in two other fields.

So,

<input type="hidden" name="name" value="" />
<input type="text" name="first" value="" />
<input type="text" name="second" value="" />

If the user types First in the first input field and Second in the second input field, I want the name input field to be "First Second"...

Tried using keyup and keypress, but can't get it to append to what's already there?

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about append