View Single Post
Old 10-15-2006, 12:42 PM  
Dirty F
Too lazy to set a custom title
 
Dirty F's Avatar
 
Industry Role:
Join Date: Jul 2001
Posts: 59,204
Quote:
Originally Posted by BV View Post
try this one:


<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
var refarray = new Array();
refarray['excite.com'] = "http://www.domain.com?from=excite";
refarray['google.com'] = "http://www.domain.com?from=google";
refarray['yahoo.com'] = "http://www.domain.com?from=yahoo";
refarray['altavista.com'] = "http://www.domain.com?from=altavista";
refarray['alltheweb.com'] = "http://www.domain.com?from=alltheweb";
refarray['msn.com'] = "http://www.domain.com?from=msn";
refarray['lycos.com'] = "http://www.domain.com?from=lycos";
refarray['infoseek.com'] = "http://www.domain.com?from=infoseek";
for (var i in refarray) {
if (document.referrer.indexOf(i) != -1) window.location.replace(refarray[i]);
}
// End -->
</script>
Ok i got it working.

I suggest replacing the last line with

if (document.referrer.indexOf(i) != -1) window.open('http://www.mysite.com/404.htm?','_top');
}

Because it will break the frame.

Last edited by Dirty F; 10-15-2006 at 12:43 PM..
Dirty F is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote