Combining two input fields to one, jquery

Posted by nic_dk on Stack Overflow See other posts from Stack Overflow or by nic_dk
Published on 2010-04-21T07:51:24Z Indexed on 2010/04/21 7:53 UTC
Read the original article Hit count: 174

Filed under:

Im trying to combine the name field, and msg field, and input all values into #msg, but cant quite get it to work

$('#DocumentCommentsForm_21').bind('submit', function(){ var name = "##" + $('#navn').val() + "##"; var msg = $('#msg').val(); $('#msg').val(name+' '+msg); }); alert($('#msg').val(name+' '+msg));

© Stack Overflow or respective owner

Related posts about jQuery