[Javascript] Ajax - New Page

David Dorward david at dorward.me.uk
Tue Aug 19 18:10:03 CDT 2008


On 19 Aug 2008, at 23:50, (Margaret) Michele Waldman wrote:

> It would be a general thing.
>
> Ajax in the classic form creates an xml object and calls a php script.
>
> When the server finishes with the php script, it returns xml.

Not quite. In the classic form, it creates an XMLHttpRequest object  
and makes a request to the server, which returns XML. XML doesn't need  
to be passed, and PHP doesn't need to be used to generate the response.

These days (i.e. the non-classic form), its generally accepted that  
Ajax means any use of JavaScript to make an HTTP request and update  
the page based on the response.

> However, if the page that originally called the php script is no  
> longer in
> the client's browser and error is generated by the xml.

The XMLHttpRequest object should have been destroyed when the browser  
discarded the page. The response from the server should be ignored.

> You can look at the website: http://www.wantedgaming.com/shop.
>
> Click the right box alternating breaking/game news over repeatedly.   
> They
> are both ajax pages.  Eventually, the xml error will occur because the
> client is switching out the pages faster than the server is  
> returning the
> xml object.

I can't reproduce the problem. The only complaints my debugger gives  
are warnings that you are using document.all.

http://developer.mozilla.org/en/docs/Using_Web_Standards_in_your_Web_Pages:Using_the_W3C_DOM

-- 
David Dorward
http://dorward.me.uk/
http://blog.dorward.me.uk/





More information about the Javascript mailing list