Re: [PHP] RE: AJAX with POST

2009-04-05 Thread Bruno Fajardo
Ajax is asynchronous. The option of asynchronous or synchronous can be set in the XMLHTTPRequest object (used by Ajax), but a synchronous call is not Ajax. Cheers, Bruno. 2009/4/5 Phpster phps...@gmail.com Ajax can be both async and sync. Itsbthe fourth param in the open call and I believe by

Re: [PHP] RE: AJAX with POST

2009-04-05 Thread Phpster
On Apr 4, 2009, at 21:33, Skip Evans s...@bigskypenguin.com wrote: But my function using GET does seem to wait. Granted I cobbled it together from various samples and didn't author it from my own deep understanding of the exact process, but here's the snippet that does the real work.

[PHP] RE: AJAX with POST

2009-04-04 Thread Brad Broerman
Well, as the A in Ajax is asynchronous, there's no real way to make it wait. What you would normally do is use a callback: function createXHRObject( ) { if (typeof XMLHttpRequest != undefined) { return new XMLHttpRequest(); } else if (typeof

Re: [PHP] RE: AJAX with POST

2009-04-04 Thread Skip Evans
But my function using GET does seem to wait. Granted I cobbled it together from various samples and didn't author it from my own deep understanding of the exact process, but here's the snippet that does the real work. req.open('GET', url, false); req.send(null); if(req.responseText) {

Re: [PHP] RE: AJAX with POST

2009-04-04 Thread Phpster
Ajax can be both async and sync. Itsbthe fourth param in the open call and I believe by default it's a sync call not async Bastien Sent from my iPod On Apr 4, 2009, at 21:33, Skip Evans s...@bigskypenguin.com wrote: But my function using GET does seem to wait. Granted I cobbled it