Datasheet

FIGURE 1.31
Using an Ajax Rolodex
This Rolodex works using CSS to display its data. Each time you click a person’s name, the applica-
tion fetches that person’s data from the server, puts together a Rolodex card, and then displays that
card using CSS to modify the Web page on the fly.
That’s the way it works: You display the results of your actions in a Web page at run time. You
don’t cause a page refresh to happen.
Another example that shows how to modify a Web page is located at
http://digg.com/spy,
which is shown in Figure 1.32. This site presents news articles that users vote on in real time, and
constantly updates itself using a combination of CSS and dynamic HTML. The list of articles you
see displayed keeps changing as users vote on them, and each article gets a thumbs-up or thumbs-
down icon. It’s all done using Ajax to fetch data from the server without causing a page refresh.
25
Essential Ajax
1
06_102633 ch01.qxp 2/23/07 9:44 PM Page 25