Link to home
Start Free TrialLog in
Avatar of mmarth
mmarth

asked on

need help with jquery autocomplete and option appendTo

i am using jquery autocomplete which is working except that the results are being overwritten on the input field. if i try to use appendTo nothing works.

any help will be appreciated.
test5.php
Avatar of leakim971
leakim971
Flag of Guadeloupe image

which input field?
if you want to put all selected SKU found to an input, use an array and push every result inside :

   $(function() {  
      var myTagKey = []; 

      $("#tags").autocomplete({
         source:  testSource,
         select: function(event, ui) {
                 myTagKey = ui.item.tagkey; 
                 myTagKey.push(myTagKey);
                 $("#foundtagkey").html("SKU: "+myTagKey.join(" ,"));

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Julian Hansen
Julian Hansen
Flag of South Africa image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mmarth
mmarth

ASKER

the problem was that it was writing the list over the input box. since it worked for you, i looked in the .js files that i was using and changed appendTo from null to body and then set message='' so that no message would be returned