Combining autocomplete with suggestionlist and clone

Combining autocomplete with suggestionlist and clone

Hello,

I'm having an issue combining two differnt plugins..

  1. <script type="text/javascript">
  2. function lookup(inputString) {
  3. if(inputString.length == 0) {
  4. // Hide the suggestion box.
  5. $('#suggestions').hide();
  6. } else {
  7. $.post("rpc.php", {queryString: ""+inputString+""}, function(data){
  8. if(data.length >0) {
  9. $('#suggestions').show();
  10. $('#autoSuggestionsList').html(data);
  11. }
  12. });
  13. }
  14. } // lookup
  15. function fill(thisValue) {
  16. $('#inputString').val(thisValue);
  17. setTimeout("$('#suggestions').hide();", 200);
  18. }
  19. </script>

  1. <script type="text/javascript">
  2. $(function(){
  3.   var removeLink = ' <a class="remove" href="#" onclick="$(this).parent().slideUp(function(){ $(this).remove() }); return false">remove</a>';
  4. $('a.add').relCopy({ append: removeLink});
  5. });
  6. </script>

My problem is when i'm trying to add a new row the autocomplete script inserts only to the first item..