Link to home
Start Free TrialLog in
Avatar of slightlyoff

asked on

jQuery Auto Complete

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",
			select: function( event, ui ) {
				log( ui.item ?
					"Selected: " + ui.item.value + " aka " + :
					"Nothing selected, input was " + this.value );

Open in new window

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"/>

Open in new window

Any ideas on what I might be doing wrong?

Thank you for your help!!!
Avatar of leakim971
Flag of Guadeloupe image

out of the code you post you've a event.preventDefault() or similar on a click event : Remove it
Can you post a link or full source for the page.
Avatar of Chris Stanyon
Chris Stanyon
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of slightlyoff


Thank you!  That was what I needed :)