/* Endeca Type Ahead [ begin ] */ $(document).ready(function() { $("input[name=search_box]").autocomplete( { minChars: 3, mustMatch:0, formatResult: function(row) { // alert(row[1]); // this pops up an alert for each item as the list populates. return row.to; }, selectFirst: false, cacheLength: 0, url: "/catalog/endeca_type_ahead.cmd" } ); }); //called from updated ui.autocomplete.js //i stopped the submit int the .js file, and called this function so we can pass parameters function generateUrlAndSubmit(selected){ //get the navParm value var navParmVal = selected.data.toString().split(",")[1]; //have to add an option to the select box, otherwise the new value wont submit with the form $("#navparm_dropdown").append(''); $("#navparm_dropdown").val(navParmVal); search(document.endecaSearchForm); }