Re: [PHP] pause until page is loaded

2006-04-19 Thread Jochem Maas

Richard Lynch wrote:

On Tue, April 18, 2006 4:19 pm, Benjamin Adams wrote:


I created a script to redirect to a download auto.
but it redirects before the Whole page is loaded.
How do I pause until page is loaded?



If you want to wait until the BROWSER loads the whole page, then the
BROWSER has to tell you when it has finished.

Since the communication between the BROWSER and PHP is limited to:
BROWSER:  Gimme this URL
PHP: Here, here's your data.  Bye.  I'm gone.

Note that the browser could spend an HOUR (in principle) rendering the
data sent by PHP, if that rendering was particularly difficult.

So, clearly, PHP is *NOT* going to be able to do what you want.

You are therefore urged to consult a Javascript list.

Or an AJAX list.

Or, really, any kind of mailing list about running code on a BROWSER,
but not PHP, which runs on the SERVER.


I don't suppose this is the time to mention that Wez Furlong wrote a
browser plugin that allows you to run php code in the browser in the same
way you would normally run javascript ;-) 
[http://pecl.php.net/package/PHPScript]

(Benjamin - just to be clear, Richard is correct and my comment doesn't help
your problem 1 iota, sorry :-)



:-)



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



Re: [PHP] pause until page is loaded

2006-04-18 Thread Richard Lynch
On Tue, April 18, 2006 4:19 pm, Benjamin Adams wrote:
> I created a script to redirect to a download auto.
> but it redirects before the Whole page is loaded.
> How do I pause until page is loaded?

If you want to wait until the BROWSER loads the whole page, then the
BROWSER has to tell you when it has finished.

Since the communication between the BROWSER and PHP is limited to:
BROWSER:  Gimme this URL
PHP: Here, here's your data.  Bye.  I'm gone.

Note that the browser could spend an HOUR (in principle) rendering the
data sent by PHP, if that rendering was particularly difficult.

So, clearly, PHP is *NOT* going to be able to do what you want.

You are therefore urged to consult a Javascript list.

Or an AJAX list.

Or, really, any kind of mailing list about running code on a BROWSER,
but not PHP, which runs on the SERVER.

:-)

-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] pause until page is loaded

2006-04-18 Thread Satyam

Run it on the onLoad event of the Body entity.


- Original Message - 
From: "Benjamin Adams" <[EMAIL PROTECTED]>

To: "php Nichel" 
Sent: Tuesday, April 18, 2006 11:19 PM
Subject: [PHP] pause until page is loaded



I created a script to redirect to a download auto.
but it redirects before the Whole page is loaded.
How do I pause until page is loaded?

Ben

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





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



Re: [PHP] pause until page is loaded

2006-04-18 Thread Benjamin Adams
I tried it but it still stops half way through the page and then  
continues.


On Apr 18, 2006, at 5:24 PM, Jay Blanchard wrote:


[snip]
I created a script to redirect to a download auto.
but it redirects before the Whole page is loaded.
How do I pause until page is loaded?
[/snip]

Page loading is client-side, but you can delay the redirect using
sleep().



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



RE: [PHP] pause until page is loaded

2006-04-18 Thread Jay Blanchard
[snip]
I created a script to redirect to a download auto.
but it redirects before the Whole page is loaded.
How do I pause until page is loaded?
[/snip]

Page loading is client-side, but you can delay the redirect using
sleep().

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



[PHP] pause until page is loaded

2006-04-18 Thread Benjamin Adams

I created a script to redirect to a download auto.
but it redirects before the Whole page is loaded.
How do I pause until page is loaded?

Ben

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