hey guys. im trying to copy the value of a text box to another text box on button click. what i have are 2 tables: `add-guest` and `guest-list` and a left button(<) and a right button(>) in between those 2 tables. In table `add-guest` names are populated from database into the body of the table using `.load()` . say for example there are 3 names in `add-guest`: noreen, marzuki, sufiz. name : noreen, is clicked (`$(".the-names").live("click", function()`) and alert pops up : noreen then the `right button`, to copy to `guest-list`, is clicked (`$("#moveright").live("click", function(){`) and alert pops up : …

Member Avatar
Member Avatar
+0 forum 1

Hi. i got table A(contact-names) which is where name are populated to from db and table B(guest-names) where names from table A will be appended to. this is the js i came up with to append the names: var msg2 = '<tr class="tr"><td><input type="text" name="GName" class="input-name" placeholder="Doubleclick on a name." size="40" readonly></td></tr>'; $('.contact-names').load('/EMS2/showUser.php'); $(".guest-names").append(msg2); $(".contact-names tr").live("dblclick", function(){ var name = $(this).text(); $(".input-name").val(name); $(".tr").append(msg2); $(this).empty(); }); as u can c the doubleclick function is missing something. as of right now the name does append into the text box and also appends a second text box under the first (good). but then …

Member Avatar
Member Avatar
+0 forum 2

The End.