Most AJAX scripts will run asynchronously - so you can send off the request to the server in the background and carry on doing things at the client end, waiting for a response from the server - this is when you need the onreadystatechange.
However, 'AJAX' scripts can also run 'synchronously' (which is kinda AJAX without the 'A'?!) - in which case the script waits for a response from the server, no background processing, your script is stuck until you get a response. No need for the onreadystatechange.
Quote:
|
page_request.open('GET', url, false)
|
With a 3rd parameter set to false, the script seems to be opening a synchronous request - so no need for onreadystatechange in this case (AJAX without the 'A'). This needs to be true for a regular asynchronous AJAX request.
(Well, I believe that's the idea... I'm no AJAX expert!)