NYCPHP Meetup

NYPHP.org

[nycphp-talk] Waiting for query redirect...

csnyder at chxo.com csnyder at chxo.com
Thu Oct 30 17:47:23 EST 2003


Quoting Mark Armendariz <nyphp at enobrev.com>:

> On sites like expedia.com and
> orbitz.com, when you do a search and it goes out to the airline api (sabre i
> believe it is), it shows an animated loading message, basically tellign the
> user that it's grabbing the info they're looking for.
>  

Off the top of my head...

You could cheat with some Javascript:

<body onload="hideDiv('foo');" >
 <div id="foo">Please stand by.</div>
.... rest of the result here

Trick is forcing PHP to flush the output buffer after you print the div.

OR you could hand off the query to a backend cli script that will write the
result to a file, and use a refresh loop to keep checking for the file and
displaying "please wait" if it's not found. 

That's a lot more complex, and possibly prone to security problems, but might be
smoother from the client perspective.

  csnyder



More information about the talk mailing list
Automatic Email Organization without missing anything!