User talk:Noverflow

Hey Adam,

I made a change to your 'Search Suggest' page, so it searches for the whole word (and not drops the last character). I don't know if that was a bug or that you did it on purpose. If you did it on purpose, then just rollback the last change ;-)

TheDevilOnLine 14:23, 13 March 2008 (UTC)

Hello Adam,
I started to use your extension 'Search Suggest', and I had to include some fix to reduce the overload (now, each time you press a key, one search is launched to the database). If I write five letters, I send five selects to the database.

I included a few lines of code to implement a delay pattern. This way you will send only one select, 1 second after the user finishes to write. If you like you could implement a php switch to alternate the two ways (immediate search or delay search, and a variable for the delay).

Thanks for all, I hope you like it, best regards,

// // INCLUDE THIS FUNCTION IN <"searchsuggest.js"> // // Delay Pattern for searchsuggest extension var id=0;

function SearchCallTimed { if (id > 0) { clearTimeout (id); }	id = setTimeout("SearchCall;",1000); } // end Delay Pattern

// // LOCATE THIS FUNCTION AT THE END OF THE FILE AND CHANGE THE CALL TO <"SearchCall;"> to <"SearchCallTimed;"> // function ss_ajax_onload{ var x = document.getElementById('searchInput'); x.onkeyup = function{ SearchCallTimed; // CHANGE THIS LINE }; }

Nino dafonte 09:38, 10 April 2008 (UTC)