Welcome Guest ( Log In | Register )




                Web Hosting Guide

I Need A Re-direction Script, I need a script...
imajin8shun
post Jul 7 2005, 05:41 AM
Post #1


Member [ Level 1 ]
Group Icon

Group: Members
Posts: 38
Joined: 30-June 05
Member No.: 6,728


I'm looking for a re-direction script to re-direct you form one page to another automatically within the space of a few seconds. Like say I type www.sitename.com I want the script to activate straight away or within a few seconds to take them to like ww.sitename.com/file.php.

I've looked through good-tutorials, phpfreaks, kirupa, html-goodies, and I couldn't find a script. can anyone help. HTML, PHP, JavaScripts are the kind I'm looking for, prefeably html or php.

Note: I didn't know where to post this seeing as I'm looking for one of three different types of scripts.

This post has been edited by microscopic^earthling: Aug 23 2005, 05:19 PM
Go to the top of the page
 
+Quote Post
 
New Topic
Replies
jet
post Jul 7 2005, 07:13 AM
Post #2


Advanced Member
Group Icon

Group: Members
Posts: 140
Joined: 24-April 05
From: Australia
Member No.: 4,289


There are many simple codes out there to redirect, and Dynamic Drive (DHTML Scripts) offers this more complicated one:

CODE
<script>

//Browser redirect Script- © Dynamic Drive (www.dynamicdrive.com)
//For full source code, 100's more DHTML scripts, and Terms Of Use,
//visit dynamicdrive.com

var browser_type=navigator.appName
var browser_version=parseInt(navigator.appVersion)

//if NS 6
if (browser_type=="Netscape"&&browser_version>=5)
window.location.replace("PAGE URL FOR SOMEONE USING NETSCAPE 4")
//if IE 4+
else if (browser_type=="Microsoft Internet Explorer"&&browser_version>=4)
window.location.replace("PAGE URL FOR SOMEONE USING INTERNET EXPLORER")
//if NS4+
else if (browser_type=="Netscape"&&browser_version>=4)
window.location.replace("PAGE URL FOR SOMEONE USING NETSCAPE 6+")
//Default goto page (NOT NS 4+ and NOT IE 4+)
else
window.location="http://www.dynamicdrive.com"
</script>


As you can see, that enables people to go to different places depending on their browser.. Not entirely necessary, of course, but nothing ever is. And never use a blank page to redirect - always put a "redirecting in x seconds, click here if your browser is being disobedient" link.
Go to the top of the page
 
+Quote Post

Posts in this topic


Fast ReplyReply to this topicNew Topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Collapse

> Similar Topics

    Topic Title Replies Topic Starter Views Last Action
No New Posts  
4 PHP
8 bluefish 3,123 16th March 2010 - 02:01 PM
Last post by: iG-op
No New Posts 7 Niru 4,442 20th February 2010 - 07:04 AM
Last post by: iG-suresh
No new   19 Feelay 9,164 18th February 2010 - 08:47 AM
Last post by: iG-Tsholofelo
No New Posts   10 Eggie 8,397 10th February 2010 - 06:47 AM
Last post by: iG-
No New Posts   6 Skepticus 184 7th February 2010 - 02:16 AM
Last post by: 8ennett
No New Posts   0 8ennett 68 30th January 2010 - 11:10 PM
Last post by: 8ennett
No new   25 JohnNitro 15,357 26th January 2010 - 11:30 AM
Last post by: iG-mdshare
No New Posts   3 wutske 1,196 18th December 2009 - 07:36 AM
Last post by: iG-anil kumar
No new   23 TavoxPeru 13,103 6th December 2009 - 01:38 PM
Last post by: iG-Alex Finney
No New Posts   10 yordan 2,538 27th October 2009 - 11:31 PM
Last post by: HannahI
No New Posts   2 pbolduc 3,555 3rd October 2009 - 08:20 PM
Last post by: iG-Andrew
No New Posts   11 soleimanian 5,146 22nd September 2009 - 12:01 PM
Last post by: iG-
No New Posts   7 Eggie 2,612 9th September 2009 - 02:22 AM
Last post by: iG-nate
No New Posts   12 m3th 8,026 29th August 2009 - 12:16 AM
Last post by: dmnhunter
No New Posts   2 Alex@Synergy 4,913 23rd July 2009 - 02:11 PM
Last post by: iG-peter


Web Hosting Powered by ComputingHost.com.
HONESTY ROCKS! truth rules.
Creative Commons License