Web Design with Ajax | 2 | WebReference

Web Design with Ajax | 2

Web Design with Ajax

"Reloads? We don't need no stinking reloads."

There's nothing more annoying than an application that redraws the whole page everytime you push a button or type in a value. In Katie's report, only a few numbers are changing, but the entire page has to be redrawn.

First, let's figure out why all that reloading is going on......

Ajax to the rescue

Do you see what the problem is? Every time Katie wants to find out the latest number of boards sold, the entire screen is redrawn, and she's left with the Internet version of snow blindness.

Use Ajax to fix the web report...

Let's change Katie's report to use Ajax to send the request for updated board sales. Then we can get the response from the server, and update the web page using JavaScript and dynamic HTML. No more page reloading, and Katie will be a happy snowboarder again.

Created: March 27, 2003
Revised: May 08, 2006

URL: http://webreference.com/programming/hra/1