Automatic page to page

Status
Not open for further replies.

Sashoon

Baseband Member
Messages
55
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.
 
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: http://wwwyoursite.com/index.html");
?>

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 :)
 
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 www.google.com
 
Status
Not open for further replies.
Back
Top Bottom