Artotems Redirect A Page
Artotems Redirect A Page
We get a lot questions related to this. The codes below can take a user to another site or to another page on the same site.
In some cases people are wanting a timed delay after a certain thing occurs on the home page of their site. The second does exactly that by a timing variable.
Redirect a Page in iWeb
Simple Redirect
Copy the code below paste it into an HTML Snippet and replace yoursite.com and yourpage.html
<script type="text/javascript">
parent.location.replace('http://yoursite.com/yourpage.html');
</script>
Timed Redirect
Copy the code below, paste it into an HTML Snippet and replace yoursite.com and yourpage.html
Change the number 3 to any number. Test the results to get what you want and have fun!
<script type="text/javascript">
var url ='http://yoursite.com/yourpage.html';
var delay = 3;
var d = delay * 1000;window.setTimeout('parent.location.replace(url)', d);
</script>
If you value and use Artotems iWeb Tips and Tricks please consider making a $10 donation to support more assistance in the future as well as the charitable work Artotems Co. does for others around the world.
© 2007 C. Tucker / Artotems Co, All rights reserved.
