Computer ForumsComputers  

Go Back   Computer Forums > The World Wide Web > Web Site Hosting / ISP Q & A

Reply
 
LinkBack Thread Tools Display Modes
Old 09-21-2004, 08:50 PM   #1 (permalink)
Junior Techie
 
Join Date: Jul 2004
Posts: 55
Default Automatic page to page

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.
Sashoon is offline   Reply With Quote
Old 09-21-2004, 10:01 PM   #2 (permalink)
Wizard Techie
 
Join Date: Jul 2003
Posts: 3,940
Default

use refresh:

http://www.macalester.edu/cit/docs/howto/urlredirect/
ekÆsine is offline   Reply With Quote
Old 09-21-2004, 10:19 PM   #3 (permalink)
Monster Techie
 
Join Date: May 2004
Location: Tucson, AZ, USA
Posts: 1,184
Send a message via AIM to Vormund Send a message via MSN to Vormund Send a message via Yahoo to Vormund
Default

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
Vormund is offline   Reply With Quote
Old 09-22-2004, 06:59 PM   #4 (permalink)
Junior Techie
 
Join Date: Jul 2004
Posts: 55
Default

thanks guys
Sashoon is offline   Reply With Quote
Old 09-28-2004, 02:21 AM   #5 (permalink)
Monster Techie
 
Join Date: Jul 2004
Location: Manchester, UK
Posts: 1,910
Default

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
__________________
AMD Athlon X2 4400+ (Toledo)
Asus A8V Deluxe
E-VGA 7800GS 256MB AGP
4 X 512MB DDR400 Kingston Value
2 X 160 ATA133 H/D
2 X DVD Drives
Antec Sonata II (with 480W PSU)
21.3" Viewsonic VP211b TFT.
Blind_Arrow is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 04:25 PM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0