Originally posted by daemon
How can I write one of those "you are being automatically directed to the next page" link that waits 2 sec and then loads another site?
You can accomplish this either by a meta refresh tag or via Javascript.
For example, to create a page that redirects to another page after certain time, you could create following HTML page:
Code:
<html>
<head>
<title>Redirect example</title>
<meta http-equiv="refresh" content="5; URL=http://www.theplace.com/you/want/to/redirect/">
</head>
<body>
You will be redirected in 5 seconds to a new page.
If your browser does not redirect you automatically,
please click here (here goes the link)
</body>
</html>
For example, you could set your script to output following page and perhaps dynamically change the url to fit your needs to redirect the user.
Note: it would be wise to provide a link to the page in case if the redirect fails (for a reason or another).
Since I'm not too familiar with Javascript, I'll let somebody else to provide more exact details how to do the same with it.
Bookmarks