RE: php redirection..

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: bruce [mailto:bedouglas@xxxxxxxxxxxxx]
> Sent: Thursday, December 14, 2006 12:08 PM
> To: 'Brad Fuller'; 'PHP General List'
> Subject: RE:  php redirection..
> 
> all these are solid posts...
> 
> however, the original posting, was not to do a redirect on the page being
> presented.
> 
> the original post, was to display some content rolling down the page, wait
> some time, and 'then' redirect the user to another page. i wanted to be
> able
> to accomplish this without having the user hitting some 'submit' button.


Uhhh... what do you think setTimeout() does?

Did you even look at the code, let alone test it?  


> thanks!
> 
> 
> -----Original Message-----
> From: Brad Fuller [mailto:bfuller@xxxxxxxxxxxxxxxx]
> Sent: Thursday, December 14, 2006 8:40 AM
> To: 'PHP General List'
> Subject: RE:  php redirection..
> 
> 
> 
> Better to do this on the client side with JS
> 
> <html>
> <head>
> <title>Redirect Test</title>
> <script language="JavaScript">
> function redirect() {
> 	location.href='http://www.google.com/';
> }
> </script>
> </head>
> <body onLoad="setTimeout('redirect()', 3000);">
> <p>You will be redirected in 3 seconds...</p>
> </body>
> </html>
> 
> 
> > -----Original Message-----
> > From: Youri LACAN-BARTLEY [mailto:ylacan@xxxxxxxxxx]
> > Sent: Thursday, December 14, 2006 10:44 AM
> > To: PHP General List
> > Subject: Re:  php redirection..
> >
> > Budi Setiawan wrote:
> > >> basically:
> > >>
> > >> cat.php
> > >>  -echo " test content<br>"
> > >>  -echo " more test content<br>"
> > >>
> > >> //redirect user
> > >>  echo"
> > >>   <script>
> > >>     location.href='foo.php';
> > >>   </script>
> > >>  ";
> > >>
> > >
> > >
> > > Hi , im a new too..
> > >
> > > but you can try with this to delay your script running for some
> seconds
> > :
> > > echo " test content<br>"
> > > echo " more test content<br>"
> > >
> > > // you can add :
> > > sleep(2);
> > > // this will cause your script delayed for 2 seconds
> > >
> > > //redirect user
> > > echo"
> > > <script>
> > > location.href='foo.php';
> > > </script>
> > > ";
> > >
> >
> > This would work providing you don't use output buffering, otherwise the
> > user won't see any data whatsoever that has been sent prior to the
> > sleep() call.
> >
> > >
> > > // hhaha..
> > > // im just trying to help...
> > > //
> > >
> >
> > --
> > 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
> 
> --
> 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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux