We've posted another new Ajax article from
Professional JavaScript author Nicholas C. Zakas. This article is an excerpt from his other book
Professional Ajax, which I think should be of interest to this forum's readers:
Creating an Ajax Search Widget
The most widely used function of the Web is searching. It's not even an option; if you want to find any information, the search engines of the Web are the places you have to go to.
With the ever-expanding technology of the Web, conventional search engines are opening the doors to more unconventional means to get you to the content you desire. The first to jump onto the scene was Yahoo! with their Y!Q service (
http://yq.search.yahoo.com/publisher/index.html). This new service enables you to search from any web page, provided the page's author includes it in their web page. It is a service to provide related search results to the content at hand, giving readers more information at their fingertips without leaving your page.
The Yahoo! Y!Q service is a great idea, but it hasn't surfaced without criticism. The main argument? It requires the use of Yahoo!'s JavaScript and you have to add a <form/> element, meeting the Yahoo! requirements, to perform the search. For many web site authors, it takes too much effort to provide the service. And after all the work, the search results are presented in the Yahoo! style, breaking the look and feel of your web site.
Thankfully, Yahoo! isn't the only search engine breaking into this "provide search results from your web site" service. MSN Search (
http://search.msn.com) provides a similar service, except it enables the web developer to control the look, feel, and implementation. This ability comes from MSN Search providing RSS versions of its search results, making it possible to subscribe to a particular search or add the results to your page using Ajax methods.
...
read the
complete article here.
Jim Minatel
Senior Acquisitions Editor
Wiley Technology Publishing
WROX Press
Blog:
http://wroxblog.typepad.com/
Jim's Book of the week:
No book this week - Donate to the Red Cross!