Hello
I have a working autocomplete function which populates a list from a remote database, which works nicely. However, I need to be able to pass my function a variable instead of the input id of my text input field....
Here is my code...
I have a working autocomplete function which populates a list from a remote database, which works nicely. However, I need to be able to pass my function a variable instead of the input id of my text input field....
Here is my code...
Code:
$(function() {
$("#input").autocomplete({
source: "search.php?field=field1"
});
});
<p><b>input:</b><input type="text" input id = "input" name="field1" size="60" ><br>
[/code}
Instead of my function using "#input" I want it to get the input id of the calling input so that I can have multiple input fields using the same autocomplete function.....
Any help would be appreciated
Thanks