View Single Post
  #4 (permalink)  
Old 03-10-2007, 12:22 PM
killerkev06 killerkev06 is offline
Persona Non Grata
 
Join Date: Mar 2007
Posts: 124
iTrader: (0)
killerkev06 is on a distinguished road
Default

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!)
Reply With Quote
Sponsored Links
Register and sign in to hide this ad block