PHP Runner has the great ajax search suggest feature. The only thing it lacks is the ability to instantly perform the search as soon as you select one of the suggested options that appear below the search box. Currently you hav to select an option, then manually click/submit the search for it to take place.
If you are interested in having your searches perform like the "Google Instant" feature, here's how you do it.
- Find the "ajaxsuggest.js" file in your "include" folder wherever your app folder is output.
- Add the following line of code to the end of the setSearch function (inside that function of course):
runLoading(1,getParentTableObj(1),4); searchController1.submitSearch();
3. That's it. So the setSearch function should now look like this:
function setSearch(inputName,value){
if(setSearch.arguments[2]=='lookup'){isLookupError=false;var helement=$("#"+inputName.substring(8)+setSearch.arguments[4])[0];$("#"+inputName+setSearch.arguments[4]).removeClass("highlight");$("#"+inputName+setSearch.arguments[4]).val(value);if($(helement).val()!=setSearch.arguments[3])
{$(helement).val(setSearch.arguments[3]);$(helement).change();}}
else
$("input[@type=text][@name="+inputName+"]").val(value);DestroySuggestDiv();
runLoading(1,getParentTableObj(1),4); searchController1.submitSearch();
}