<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.min.js"></script>
<script type="text/javascript" src="http://dev.jquery.com/view/trunk/plugins/autocomplete/jquery.autocomplete.js"></script>
$('#query').autocomplete({
source: 'parts_by_partno.php',
select: function (event, ui) {
$("#query").val(ui.item.label); // display the selected text
$("#hiddenId").val(ui.item.value); // save selected id to hidden input
}
});
I’m getting no errors in firebug, but firebug shows this function is not even making a call to the page. What am I doing wrong?
Check this out:
http://jsfiddle.net/xJpsL/1/
If I watch the network requests in chrome, it’s requesting it properly. You didn’t forget script tags, I assume? Incidentally, that third javascript file for autocomplete.js does not exist (nor is it needed as autocomplete is part of the jquery ui file).