开发者

jQuery Autocomplete Search like Hotmail

开发者 https://www.devze.com 2023-02-12 12:26 出处:网络
I wanted to build an Autocomplete Search Box like the one in Hotmail. When you start typing it will return the records found in the autocomplete list and at the button it will enter the search Criter

I wanted to build an Autocomplete Search Box like the one in Hotmail.

When you start typing it will return the records found in the autocomplete list and at the button it will enter the search Criteria for From, Sub开发者_C百科ject and To.

Depending on which you click you will get the results. If you click on the normal values it will show you the corresponding mail and if you click on From, Subject or To ot will search e.g. in From if you clicked on From.

How can this be done??

Thank you!!


Look into jQuery.ajax, you can bind to the "keyup" event of your text field, and then have jQuery call a webservice that will return JSON results for your search, you can then format the results as you desire.


I think this is the best autocomplete plugin for jquery: http://jqueryui.com/demos/autocomplete/

you can customize it as you want, it's very flexible, moreover the examples on jquery-ui.com are self-explaining!

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号