I'm close to getting the autocomplete to finally work...but.....

First of all, I'm using Java / .jsp to query a database for results

I'm sending the url to my servlet, my servlet passes the data back to
the .jsp page....Nothing appears in my dropdown UNLESS I use my mouse,
click outside of the textbox and then click back into it.  Then the
autocomplete works great and displays the data from the database

I've tried IE, Opera, Firefox and everyone of them requires me to
start typing in the text box, click out, click back in then the
autocomplete displays.

Is this a bug or am I'm doing something wrong.

I've read something in this form about a guy wanting to know if there
was a "reinitialize" function that could be called in the javascript
once the data was brought back from the servlet...I didn't see a
solutions, but think maybe this is what I need.

Here is sample code:

//JavaScript Code
function getNames()
{
      $("#name").autocomplete("employeedirectory?command=ajax&q=" +
document.forms[0].test.value + "&        limit=10");
}

//HTML
Name:
<input type="text" id="name" onkeyup="getNames()

Thanks in advance



Reply via email to