Welcome Guest, Not a member yet? Register   Sign In
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.




Theme © iAndrew 2016 - Forum software by © MyBB