Automatic Redirects to Another Page

9:51 am HTML

As much as I love flash and cool technology, I’ve had to retrain myself to stay away from using flash on business web sites for SEO reason. But despite the SEO disadvantages of using Flash, some folks still insist on using it.

After you’ve created your flash intro and added it to your web page, it’ a good idea to set up an automatic redirect - so that when the flash intro is done playing, visitors will automatically be directed to your home page. This can be done easily with Java Script.

Here’s how you do it …..

The first step after creating your flash intro, is to create a web page for it. Be sure to uncheck any “loop” boxes you may see (you don’t want your flash intro to loop).

Next, you need to edit your HTML source code. You’ll want to insert the following text between your <HEAD> and </HEAD> tags.

<script language=”JavaScript”>
<!–Script courtesy of http://www.web-source.net - Your Guide to Professional Web Site Design and Development
var time = null
function move() {
window.location = ‘http://www.example.com’
}
//–>
</script>

Be sure to change the URL (shown in bold) to the page you want folks to be redirected to.

Next, insert this bit of code before the </BODY> tag.

<body onload=”timer=setTimeout(’move()’,27000)”>

You’ll want to change the number (shown in bold above) to whatever number of seconds you want (it must be seconds, not minutes). When changing this number, remember that 1000 is equal to 1 second.

So in the example code above, visitors will be automatically redirected to the page I specified in the earlier code after 27 seconds.

That’s all there is to it.

Leave a Comment

Your comment

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.