<taken from me on Chatspot site

Here is the latest Chatspot revision note:

Changeset [178] by Techboy
I did something with the xmlhttprequest stuff - I think it's pretty clever The XMLHTTPRequest would always output the response to browser even if it wasnt actually a poll. So - when HTTP returns a response it has a status number at the top of the header. I used this status number to tell the library what Chatspot was returning. HTTP/1.1 999 Chatspot Poll OK



So, here's what the XMLHTTPRequest library code for that is:

In the file where the response is generated and returned:
Code:
****if &#40;$_GET&#91;'action'&#93;=='poll'&#41; *

****&#123;

 *header&#40;'HTTP/1.1 999 Chatspot Poll OK'&#41;; 

 *// Your code here

****&#125;
In the XMLHTTPRequest Jscript:
Code:
****// We choose what we do depending on the &#34;error&#34; code the reqlib returns - clever huh? &#58;&#62; *

****if &#40;req.status == 999&#41; // Polling *

****&#123;

 *// What we do on a poll goes here

****&#125;
Hope somebody finds that useful