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

2011-03-03 Thread Daniel Brown
On Thu, Mar 3, 2011 at 09:52, Richard Sharp rsh...@aerotecheng.org wrote:
 I have been banging my head trying to figure out how to delay
 $(document).ready() command until my php script finish running and load
 data into a csv file.  Any ideas

Just one: ask on a jQuery list.  Just because PHP is running
somewhere in the mix doesn't mean it's appropriate for this list.

-- 
/Daniel P. Brown
Network Infrastructure Manager
http://www.php.net/

--
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

2011-03-03 Thread Jay Blanchard
[snip]
Just one: ask on a jQuery list.  Just because PHP is running
somewhere in the mix doesn't mean it's appropriate for this list.
[/snip]

Agreed. The list for jQuery is http://forum.jquery.com

--
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

2011-03-03 Thread HallMarc Websites
Maybe I misread this and it seems to me he is asking how they could trigger
the jQuery event after the necessary PHP script is called. Maybe it is being
over-thought, have you tried placing the javascript call after the PHP
script? Maybe wrap it in a conditional statement that isn't satisfied until
whatever necessary condition is met?
 


-- 
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

2011-03-03 Thread Steve Staples
On Thu, 2011-03-03 at 10:42 -0500, HallMarc Websites wrote:
 Maybe I misread this and it seems to me he is asking how they could trigger
 the jQuery event after the necessary PHP script is called. Maybe it is being
 over-thought, have you tried placing the javascript call after the PHP
 script? Maybe wrap it in a conditional statement that isn't satisfied until
 whatever necessary condition is met?

Could also echo the jQuery at the bottom of the PHP script, so that way,
no matter what, when the PHP is done, it will echo out (even if
buffered) once the script is completed is thing.

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?

Steve




-- 
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

2011-03-03 Thread HallMarc Websites


-Original Message-
From: Steve Staples [mailto:sstap...@mnsi.net] 
Sent: Thursday, March 03, 2011 11:00 AM
To: php-general@lists.php.net
Subject: RE: [PHP] Delaying $(document).ready() in jQuery until php script 
finish

On Thu, 2011-03-03 at 10:42 -0500, HallMarc Websites wrote:
 Maybe I misread this and it seems to me he is asking how they could 
 trigger the jQuery event after the necessary PHP script is called. 
 Maybe it is being over-thought, have you tried placing the javascript 
 call after the PHP script? Maybe wrap it in a conditional statement 
 that isn't satisfied until whatever necessary condition is met?

Could also echo the jQuery at the bottom of the PHP script, so that way, no 
matter what, when the PHP is done, it will echo out (even if
buffered) once the script is completed is thing.

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?

Steve

Well, at this point that is a JavaScript question and best left to the 
appropriate list. 





--
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



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

2011-03-03 Thread Ashley Sheridan
Jay Blanchard jblanch...@pocket.com 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 Richard Quadling
On 3 March 2011 17:25, Ashley Sheridan a...@ashleysheridan.co.uk wrote:
 Jay Blanchard jblanch...@pocket.com 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