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
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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.