If you check out http://thecomputerwarehouse.com/test.php you can see a working example of what I am trying to accomplish. You can type "q" to show results from the list.
I am using some home grown scripts I have found on the web and basically I am trying to auto populate a list and select the record which then inserts the value into the field which is working fine.
What I am trying to figure out is when you click the "add another serial number" it then gives you another field. The problem is that the next field(s) besides the first one will not auto populate the list.
In the javascript where I have
newdiv.innerHTML = "Serial Number " + (counter + 1) + " <br><input type='text' name='course"+(counter + 1)+"' id='course"+(counter + 1)+"'>";
I am trying to add the counter to it so that it ads a unique id name. The problem is that I can't figure out how to apply the same thing to the ajax code in
$("#course").autocomplete("getinventoryajax.php", {
since the first field is named "course" I need to be able to change the field with the javascript and somehow the ajax needs to recognize that as well. Since I know the reason all the other fields are not auto populating because the name of the following fields is being repeated as "course" which breaks the code.
Any advise?
UPDATE
I finally figure out how to accomplish what I needed done. I needed to add the autocomplete to my JS which ultimatly fixed my issue. There is a link from Nameisnull helped me out :) thanks