Jump to content

filtering ajax results - live


michaellunsford

Recommended Posts

So, I have a list coming from an ajax http call. I want to add a filter option, where you start typing and it automatically removes non-matching items. Imagine the friend chat feature on facebook where you start typing in a friends name to narrow the list - same theory.

 

I'm thinking doing an ajax call with the criteria at every keystroke is going to be awfully slow and intense. Am I just being silly or is there a better way to do it than sending a new http request with every keystroke?

Link to comment
https://forums.phpfreaks.com/topic/198130-filtering-ajax-results-live/
Share on other sites

Sounds kind of like an Autocomplete feature to me.  Of which there are a lot of tutorials out there.  I would take a look at one of the tutorials and see how they go about this.  Take a look here http://fromvega.com/wordpress/2007/05/08/auto-complete-field-with-jquery-code-explained/ It sould point you in the right direction.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.