Skip to Content
Yahoo! Hacks
book

Yahoo! Hacks

by Paul Bausch
October 2005
Intermediate to advanced
489 pages
12h 2m
English
O'Reilly Media, Inc.
Content preview from Yahoo! Hacks

Get Related Terms Instantly with Ajax

Pull Yahoo! related search suggestions into a web page without clicking a link, a form button, or the Refresh button.

Though widely used, JavaScript has never been considered an indispensable development language. That perception is changing, though, thanks to improvements in web browsers. Now that most widely used web browsers support a standard form of JavaScript, developers can spend their time writing code rather than tweaking the code they’ve already written. Since a single block of code can work across different browsers, JavaScript is back in the spotlight.

JavaScript’s most impressive use is in combination with XML-based services, such as Yahoo! Web Services. Because JavaScript can make requests from the user’s machine and doesn’t require a page refresh, information can be updated almost instantly without the user clicking a link, clicking a form button, or reloading the page. This makes very interactive, dynamic pages possible. The name for this type of JavaScript is Asynchronous JavaScript + XML, or Ajax for short.

A personal TagCloud on a weblog

Figure 5-28. A personal TagCloud on a weblog

This hack is a simple Ajax application that uses Yahoo! Web Services as a data source. As you type in standard HTML text input, JavaScript is in constant communication with the Yahoo! API. With every letter added, the script checks to see if Yahoo! has related search suggestions ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

What Employees Want Most in Uncertain Times

What Employees Want Most in Uncertain Times

Kristine W. Powers, Jessica B.B. Diaz
How to Become a Game-Changing Leader

How to Become a Game-Changing Leader

Douglas A. Ready, Alan Mulally
What Successful Project Managers Do

What Successful Project Managers Do

W. Scott Cameron, Jeffrey S. Russell, Edward J. Hoffman, Alexander Laufer

Publisher Resources

ISBN: 0596009453Supplemental ContentErrata Page