Hi there,
I solve a problem with append the values into the value atribute of input.
If I click on some html element, I need this text of element put into the input as its value. The problem is that I don't know, how to put several values into the input.

I try it to solve so:

$("a.knowledge").live('click', function() {	
  val = $(this).html();

I want the values puts into the input#frmfirstForm-specializace (the values are separated by ';;') -- but always I've in this input only one value, never several, on which a clicked... and I don't know, how to put in that input several values...

I will be very glad for every help, idea. Thanks.

To me, this doesn't look like you are appending value to the existing value but rather attempting to append the same attribute to the input tag... I don't use JQuery, so I am not sure the right way to fix this. If it is pure JavaScript, I could.


I think you might want $("input#frmfirstForm-specializace").val($("input#frmfirstForm-specializace").val()+';;'+val)); .

It's a bit long-winded but give it a try.