Datasheet

There are plenty of live searches besides Google Suggest available online. For example, take a look
at Gollum at
http://gollum.easycp.de/en/, which is a live search of Wikipedia, the online
free encyclopedia at
www.wikipedia.org. Gollum is shown in Figure 1.6.
FIGURE 1.6
Gollum performs live searches of Wikipedia.
Enter a partial search term in Gollum, such as “Aja” for Ajax, and you can see the results in Figure
1.6, where Gollum has connected to Wikipedia behind the scenes and found matches to your par-
tial search term. Those matches are displayed, as is usual for a live search, in a drop-down list, and
you can select the one that you’re looking for. When you do, the matching Wikipedia article is
opened in your browser.
Create an Ajax-enabled calculator
Any situation where you have to send data to the server and handle the data sent back to you behind
the scenes is perfect for Ajax. So how about an Ajax-enabled calculator? You can find one at
www.
funwithjustin.com/ajax-toybox-demo/calculator.html
, as shown in Figure 1.7.
To use the calculator, just enter two operands to work with, such as 5 and 7 in Figure 1.7, and
click the operation you want to perform addition, subtraction, multiplication, or division. Using
Ajax, this Web page sends your operands to a program on the server that adds, subtracts, multi-
plies, or divides your numbers as appropriate and sends the results back.
The results then appear in the bottom text field, as you can see in Figure 1.7, where 5 and 7 are
added. And it’s all done without a page refresh no browser flicker. This application, like other
Ajax applications, looks just as if it’s a desktop application.
9
Essential Ajax
1
06_102633 ch01.qxp 2/23/07 9:44 PM Page 9