[Automatic page to page] -
Automatic page to page
Discuss Automatic page to page
Posted by: Sashoon
Can anyone give me the script that will skip page, like if someone enter in my web site it will automaticly bring him from that page to another page.
Posted by: ekĘsine
use refresh:
[url]http://www.macalester.edu/cit/docs/howto/urlredirect/[/url]
Posted by: Vormund
If you don't want to use the "refresh"...here's some other ways...
with PHP:
<?php
header("Location: index.html");
?>
or
<?php
header("Location: [url]http://wwwyoursite.com/index.html[/url]");
?>
note: must be BEFORE any <html> statements are called
with Java Script:
put in your HEAD tag...
<SCRIPT LANGUAGE="JavaScript">
window.location="http://www.yourdomain.com/";
</script>
OR put this in your body tag...
<SCRIPT LANGUAGE="JavaScript">
<!--
location.replace("http://www.yahoo.com");
-->
</script>
or if you want to redirect after a specified time:
Redirect After Specified Time:
**************Place in HEAD tag**************
<script language="JavaScript">
<!--hide from old browsers
var time = null
function move() {
window.location = 'http://www.yourdomain.com'
}
//-->
</script>
**************Place in BODY tag**************
<body onload="timer=setTimeout('move()',2000)">
note: 2000 = 2 seconds...change it to whatever you want.
All of those work :)
Posted by: Sashoon
thanks guys
Posted by: Blind_Arrow
a very simple 1 line code in javascript
that is:
<script language="javascript" type="text/javascript">
window.location="www.google.com"
</script>
and you are done,
you can as well mention ur own file, like "mypage.html" instead of [url]www.google.com[/url]