Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automatic page changing 1

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I am very new to Dreamweaver and have a very specific task that I am currently trying to achive. I want my web site to automatically change to a new page after a set amount of time. Can anyone point me in the right direction on this.

Thanks
UMGODS
 
You can use the javascript function, setTimeout()

Here's how it works:
setTimeout('changeLocation();', 1000);

and your function would look like this:
<script language=javascript>
function changeLocation(){
location='yoursite.com';
}
</script>

Where that setTimeout function will fire your changeLocation function after one second -- you can increase that millisecond value to your heart's content.

You might want to put that setTimeout() statement in your body onLoad event like so:

<body onLoad=&quot;setTimeout('changeLocation();', 1000);&quot;>

good luck! :)
Paul Prewett
 
You can also do this using pure HTML with the following tag in the <HEAD> section ...

<META HTTP-EQUIV=&quot;Refresh&quot; CONTENT=&quot;5; URL=../index.html&quot;>

In this example, 5 refers to the number of seconds to wait before going to the page specified by the URL parameter.

Greg.
 
You can do it this way if you are unfamilear with HTML.

Go to HEAD in the options palette (where common is). Choose refresh (it looks like an arow) and then chose the time frame and the url you would like that page to go to.

Easy as A-B-C

Good luck

Dayzee
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top