Redirect with delay

#1
[eluser]Unknown[/eluser]
dear all....

i want to make a redirect url with some delay likes this site where i just click advanced search, i have read discussion in this forum: http://ellislab.com/forums/viewthread/86374/
but there is no delay to direct to another url...

any help me??

sorry about my english language..

#2
[eluser]Cro_Crx[/eluser]
In your view just have something like this near the top in the header.

Code:
<?php if(isset($redirect)): ?>
    <meta http-equiv="refresh" content="<?=$redirect['timer']?>?>;url=<?=site_url($redirect['url']?>" />
<?php endif; ?>

Then when you call it just pass in some info.

Code:
$data['refresh']['timer'] = 5;
$data['refresh']['url'] = 'some_uri';
$this->load->view('the_view', $data);

#3
[eluser]spmckee[/eluser]
It looks like you're using two different variable names there; "refresh" and "redirect".

#4
[eluser]Cro_Crx[/eluser]
whoops, yeah you are right. I think I was in a rush while answering the question. Either redirect or refresh is fine i suppose.

Thanks for pointing that out.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.