Posts Tagged ‘DHTML’

Sample AJAX Code With a Bit of Web 2.0 DHTML

May 5, 2008

Sample AJAX With a Bit of Web 2.0 DHTML

AJAX stands for Asynchronous JavaScript and XML. It has been around for ages but made popular with the so-called Web 2.0 sites. It basically means that you can update parts of a Web page after the Web page has loaded – hence asynchronous. You do not have to use XML at all and in general, you do not.

Tapoll is pictured above. It is a site where you get to predict polls as you vote on them created by professor Dan Zen some years ago. Circled are places where AJAX is used.

  • To send an invite message and receive a confirmation in the same little area without refreshing the page
  • To view a list of links and stats for all the user’s polls should they wish to see them
  • To display related content from YouTube, Flickr, Digg, etc. to inspire new poll creation

There are a number of JavaScript classes out there to handle AJAX ranging from a dozen lines to a couple hundred. Below is a link to an AJAX sample that includes a simple expanding message form HTML page, the PHP code to mail the message and the JS file that holds the AJAX class. There is a link to a ZIP file with the three files at the end.

AJAX Sample (code link is provided too)

Best of luck and remember, if you are tired of working in JavaScript… Flash developers have been working with this mind-set since 2000. We often are loading parts of the application without reloading the page.

-08-


%d bloggers like this: