Topic: Does this work? Pages that link to <a href="https://ozoneasylum.com/backlink?for=10639" title="Pages that link to Topic: Does this work?" rel="nofollow" >Topic: Does this work?\

 
Author Thread
Dark
Neurotic (0) Inmate
Newly admitted Neurotic (0) Inmate
Newly admitted
IP logged posted posted 12-03-2001 23:51 Edit Quote

Does this work as a good browser redirect? I don't have shitscape to test this with.

code:
<script>

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

//if NS 4+
if (browser_type=="Netscape"&&browser_version>=4)
window.location.replace("http://www.directme.com")
//if IE 4+
else if (browser_type=="Microsoft Internet Explorer"&&browser_version>=4)
window.location.replace("http://directme.com")
//Default goto page (NOT NS 4+ and NOT IE 4+)
else
window.location="http://directme.com"
</script>



Of cource "Directme.com" will be something else ..

[This message has been edited by Dark (edited 12-06-2001).]

mr.maX
Maniac (V) Mad Scientist

From: Belgrade, Serbia
Insane since: Sep 2000

IP logged posted posted 12-04-2001 05:50 Edit Quote

That script will only handle NS4 (not Mozilla/NS6) and all versions of IE4 or later... The following script detects Mozilla/NS6, Opera, NS4 & IE4+

<SCRIPT TYPE="text/javascript" LANGUAGE="JavaScript">
<!-- ;

// Written by mr.maX, http://www.maxworld.co.yu/

user_agent = navigator.userAgent.toLowerCase();

isMozilla = (user_agent.indexOf("gecko") >= 0) ? 1 : 0;
isOpera = (user_agent.indexOf("opera") >= 0) ? 1 : 0;
isNS4 = (document.layers) ? 1 : 0;
isIE = (document.all && !isOpera && (user_agent.indexOf("msie") >= 0)) ? 1 : 0;

// -->
</SCRIPT>


Dark
Neurotic (0) Inmate
Newly admitted Neurotic (0) Inmate
Newly admitted
IP logged posted posted 12-04-2001 20:02 Edit Quote

Hey sweet!
Thanks Max, much better

Is there anyway to add a redirect for screen resolution with that? Like both functions in one package?
<B>
<script language="JavaScript1.2">
<!--

if (screen.width==640



Post Reply
 
Your User Name:
Your Password:
Login Options:
 
Your Text:
Loading...
Options:


« BackwardsOnwards »

Show Forum Drop Down Menu