Forum Moderators: open

Message Too Old, No Replies

Page changing

Auto open page three from page two

         

Adam5000

5:13 pm on Jul 11, 2006 (gmt 0)

10+ Year Member



Hello everyone and thanks to everyone for their past help. You're all fabulous.

I'm creating a couple of new pages and I'd like to do something a little different with them.

On the home page, I've put a link to page two. "Click here to go to page two" (pageTwo.htm)

And what I'd like to do is, after the surfer clicks on the link to go to page two, have page two load and appear normally on the screen, and then after 10 seconds, have the surfer automatically go to page three. (pageThree.htm). All in the same window.

I'm thinking about using the onload event and the setTimeout() and clearTimeout() commands, but I'm not sure how to put it together.

Help!

jimbeetle

5:20 pm on Jul 11, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



If it's simply to go from page two to page three and it's something you don't specifically have to use javascript for, you can simplify it and use a meta refresh tag in the head?

<meta http-equiv="refresh" content="10">

Adam5000

8:18 pm on Jul 11, 2006 (gmt 0)

10+ Year Member



That works to continuously refresh the page each 10 seconds, and what I'm trying to do is go to page two by clicking on the link on the home page, then, after being on page two for 10 seconds, automatically go from page two to page three. Since page three won't change, there's no need for it to be continually refreshed.

Help!

jimbeetle

8:37 pm on Jul 11, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Ooops! I was in a hurry and left part of it out. Try this:

<meta http-equiv="refresh" content="10; url=http://www.example.com/page3.htm">

Adam5000

11:25 pm on Jul 11, 2006 (gmt 0)

10+ Year Member



That worked just right. You're a genius!