Zen Cart Logo
Forums / General Questions / Timed page redirects

Timed page redirects

Locked

Views: 1,721

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
7 Jul 2008, 3:13 PM
#1
0be1 avatar

0be1

Totally Zenned

Join Date:
Sep 2004
Location:
Murfreesboro, TN
Posts:
479
Plugin Contributions:
0

Timed page redirects

I am not sure if it is a page redirection I am looking for or some other terminology but here is what I am trying to do. We are using a different mailing list program and I have setup ez-pages to explain to the customer what to do once subscribed. You may see that page at:

http://www.swansoninc.com/index.php?main_page=page&id=1

and to unsubscribe at: http://www.swansoninc.com/index.php?main_page=page&id=2

Once that part of the screen has been showing for say 20 seconds I want

http://www.swansoninc.com/index.php?main_page to load.

I hope this makes sense :smile:

tia...

0be1

7 Jul 2008, 3:31 PM
#2
steven300 avatar

steven300

Totally Zenned

Join Date:
Jan 2008
Posts:
1,564
Plugin Contributions:
1

Re: Timed page redirects

Add this to the page you want to redirect from:

<script type="text/javascript">
setTimeout( "window.location.href = 'http://www.swansoninc.com/'", 20*1000 );
</script>
7 Jul 2008, 3:42 PM
#3
0be1 avatar

0be1

Totally Zenned

Join Date:
Sep 2004
Location:
Murfreesboro, TN
Posts:
479
Plugin Contributions:
0

Re: Timed page redirects

Steven300;

Thanks for the quick reply, but that did not work. I pasted the code in my ezpage (yes, I click on the html editor <> when I pasted) and it did not do anything. Is there something special to make javascript work within ez-pages?

Thanks...

0be1

7 Jul 2008, 3:51 PM
#4
steven300 avatar

steven300

Totally Zenned

Join Date:
Jan 2008
Posts:
1,564
Plugin Contributions:
1

Re: Timed page redirects

I tested it on one of my EZ-Pages before posting and it successfully redirected to your site. It's PHP which has a problem with EZ-Pages, JavaScript is okay. Sure you waited 20 seconds? Did you copy and paste the code directly from here? You might try pasting it into something like Notepad first. Not sure what else to suggest.

7 Jul 2008, 4:02 PM
#5
0be1 avatar

0be1

Totally Zenned

Join Date:
Sep 2004
Location:
Murfreesboro, TN
Posts:
479
Plugin Contributions:
0

Re: Timed page redirects

I did copy and paste it into notepad first (the second time) and it still did not work. I also viewed the page source and this is what stupid html area did

<script type="text/javascript"> setTimeout( "window.location.href = 'http://www.swansoninc.com/'", 20*1000 ); </script></div> </div> Not sure if it matters if the script has " or &quot

0be1

7 Jul 2008, 4:06 PM
#6
steven300 avatar

steven300

Totally Zenned

Join Date:
Jan 2008
Posts:
1,564
Plugin Contributions:
1

Re: Timed page redirects

0be1:

Not sure if it matters if the script has " or &quot

Yes I would think that's the problem.

7 Jul 2008, 4:40 PM
#7
0be1 avatar

0be1

Totally Zenned

Join Date:
Sep 2004
Location:
Murfreesboro, TN
Posts:
479
Plugin Contributions:
0

Re: Timed page redirects

Steven300;

I had to switch to fckeditor for zc to get it to work. Now it works flawlessly!!!

Thanks for the help :smile:

0be1

7 Jul 2008, 4:49 PM
#8
steven300 avatar

steven300

Totally Zenned

Join Date:
Jan 2008
Posts:
1,564
Plugin Contributions:
1

Re: Timed page redirects

You're welcome :smile: