k2k,
The two calls to GetXmlHttpObject() will each cause an independent request objets to be returned and they should both work quite happily.
The only proviso is that if the two response handlers both affect the same js objects or the same areas of the DOM, then you could get "race effects", whereby two closely dispatched requests could respond in the reverse order and yield unexpected results.
However, in general this won't be an issue.
Airshow
Airshow
WiFi Lounge Lizard
2,683 posts since Apr 2009
Reputation Points: 321
Solved Threads: 372
MozAndy,
This discussion probably belongs elsewhere but here goes .....
It's probably me but I'm struggling to see the relevance of your answer (interesting though it is) to K2K's question.Question is about multiple ajax requests.
Access-Control-Allow-Origin header is about cross-domain (cross-origin) issues.
Given that K2K's code uses relative urls, surely same-domain (same-origin) must apply.
Hence, an Access-Control-Allow-Origin header appears not to be necessary, and in any case irrelevant to solving issues with multiple simulatneous ajax requests.
What am I missing?
Airshow
Airshow
WiFi Lounge Lizard
2,683 posts since Apr 2009
Reputation Points: 321
Solved Threads: 372