Re: [PHP] Delaying $(document).ready() in jQuery until php script finish OT

2011-03-03 Thread Richard Quadling
On 3 March 2011 17:25, Ashley Sheridan  wrote:
> "Jay Blanchard"  wrote:
>
>>[snip]
>>What I don't get about the question is, is the document.ready()
>>shouldn't fire, until the page has completely loaded, and if the PHP
>>script is still running, the "document" shouldn't be "ready" yet,
>>should
>>it?
>>[/snip]
>>
>>The document ready function fires once the DOM is loaded - which might
>>not be the entire page (images could still be loading, etc.)
>>
>>--
>>PHP General Mailing List (http://www.php.net/)
>>To unsubscribe, visit: http://www.php.net/unsub.php
>
> That should still be after php has done its stuff, as php is all on the 
> server, javascript is on the client.
>
>
> Thanks
> Ash
> --
> Sent from my Android phone with K-9 Mail. Please excuse my brevity.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

You can push content using flush() so that the browser can get some
content before the script has finished.

You can use this technique as a poor-mans way of passing the top part
of a page with a "Loading" message which is hidden once the remaining
content is ready.

Different browsers and servers will require a certain amount or will
buffer things anyway, so YMMV.

Richard.

-- 
Richard Quadling
Twitter : EE : Zend
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Delaying $(document).ready() in jQuery until php script finish OT

2011-03-03 Thread Ashley Sheridan
"Jay Blanchard"  wrote:

>[snip]
>What I don't get about the question is, is the document.ready()
>shouldn't fire, until the page has completely loaded, and if the PHP
>script is still running, the "document" shouldn't be "ready" yet,
>should
>it?
>[/snip]
>
>The document ready function fires once the DOM is loaded - which might
>not be the entire page (images could still be loading, etc.)
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php

That should still be after php has done its stuff, as php is all on the server, 
javascript is on the client.


Thanks
Ash
--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Delaying $(document).ready() in jQuery until php script finish OT

2011-03-03 Thread Jay Blanchard
[snip]
What I don't get about the question is, is the document.ready()
shouldn't fire, until the page has completely loaded, and if the PHP
script is still running, the "document" shouldn't be "ready" yet, should
it?
[/snip]

The document ready function fires once the DOM is loaded - which might
not be the entire page (images could still be loading, etc.)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php