Free Web Hosting PHP/mySQL
GlobalWeb.com.ru Forum Index GlobalWeb.com.ru
Free Web Hosting :: Commercial Web Hosting :: PHP/mySQL :: CGI/Perl
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Browser Redirection Script

 
Post new topic   Reply to topic    GlobalWeb.com.ru Forum Index -> Javascript
Author Message
Blaq



Joined: 27 Feb 2004
Posts: 45

PostPosted: Mon Mar 01, 2004 9:32 am    Post subject: Browser Redirection Script Reply with quote

Create a blank page, and add the following code to the <head> section of it:

<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("http://mozilla.org")
//if IE 4+
else if (browser_type=="Microsoft Internet Explorer"&&browser_version>=4)
window.location.replace("http://microsoft.com")
//if NS4+
else if (browser_type=="Netscape"&&browser_version>=4)
window.location.replace("http://www.netscape.com")
//Default goto page (NOT NS 4+ and NOT IE 4+)
else
window.location="http://www.dynamicdrive.com"
</script>



This blank page will act as the browser redirector. Change the destinations inside the script from Netscape.com, Microsoft.com, and Geocities.com to others, depending on whether the user is using NS 4, NS 6+, IE 4, or none of the above, respectively.
Back to top
View user's profile Send private message
sam
Banned


Joined: 01 Mar 2004
Posts: 51
Location: IL

PostPosted: Mon Mar 01, 2004 1:16 pm    Post subject: Reply with quote

Blaq-- can you please put your code in the code tags? Exclamation
_________________
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    GlobalWeb.com.ru Forum Index -> Javascript All times are GMT
Page 1 of 1

 


Free Web Hosting, Commercial Web Hosting, PHP/mySQL Copyright © 2009
Free Scripts Directory | Free Software Downloads | Newsgroups Directory | Optel.net | Mirroraty | Cruised.net | Hardware Keylogger