troubleshooting Question

jQuery Auto Complete

Avatar of slightlyoff
slightlyoff asked on
JavaScriptjQuery
4 Comments1 Solution366 ViewsLast Modified:
I have a jQuery autocomplete function on my website, which works for the most part.  If you type more than 2 letters or numbers, it will return the results.  If I use the up and down arrow keys to highlight the results, the input box (#search) will change it's value to the selected text.  If I use the mouse to click on a result, it gets highlighted, but the value of #search never changes.

here's my code:

$( "#search" ).autocomplete({
			source: "showsearchresults_home.asp",
			minLength:2,
			select: function( event, ui ) {
				log( ui.item ?
					"Selected: " + ui.item.value + " aka " + ui.item.id :
					"Nothing selected, input was " + this.value );
			}
			});
		});

And the HTML for the search box:

<form name="search_form" id="searchbox" action="#" method="get">
                    	<input id="search" type="text" name="search" />
                        <input id="submit_top" type="submit" value="Search" onclick="this.submit"/>
                    </form>

Any ideas on what I might be doing wrong?

Thank you for your help!!!
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 4 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros