Mike's JavaScript and AJAX

Digital Clock - Updated with AJAX and XML

Server Time
Local Time

  I wrote this JavaScript and AJAX code to timeout after 8 minutes of AJAX calls which is about 500 requests to the server. That way the folks who run the server won't get angry at me for using too much bandwidth.

The timer on the first line is the clock on the remote server. It is updated once every second by the AJAX code. The AJAX code calls this PHP program on the server. This PHP program returns the time in XML format, instead of text as in the other AJAX program.

The timer on the second line is the clock on your local PC and is updated using system calls to the time functions.

I also created this page which does the same thing but gets the clock information as text rather then XML.

 
 
Debug Box:
ajax should replace this text with the results of gen_html_data.php
Requests made so far:unknown
Max requests allowed:unknown
Calls remaining:unknown
XML Data:
This is the XML data we received If you can read this things are not working
 

Home