View Single Post
  #1 (permalink)  
Old Aug 1st, 2007, 11:16
jillcary jillcary is offline
New Member
Join Date: Jul 2007
Location: london
Age: 33
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Browser detection IE mac

I've added a dreamweaver behaviour onto a webpage because my newly designed css site doesn't work on mac IE 5.2 (but appears to work on pc IE and firefox and mac safari and firefox).

I'm happy for this to be the case but would like the browser detection to redirect those on mac IE to a new page which recommends they look at the site in the other browsers.

The behaviour works fine but also redirects those on the pc as well. I only want the redirect to work on the mac. How do I amend the code to do this?

http://www.blazedevelopment.net/gold...index_mac.html

<script type="text/javascript">
<!--
function MM_checkBrowser(NSvers,NSpass,NSnoPass,IEvers,IEpa ss,IEnoPass,OBpass,URL,altURL) { //v5.0
var newURL='', userAgent=navigator.userAgent, version=0;
if (userAgent.indexOf('Netscape') != -1) {
version = parseFloat(userAgent.substring(userAgent.indexOf(' Netscape')+9,userAgent.length));
if (version >= NSvers) {if (NSpass>0) newURL=(NSpass==1)?URL:altURL;}
else {if (NSnoPass>0) newURL=(NSnoPass==1)?URL:altURL;}
} else if (userAgent.indexOf('MSIE') != -1) {
version = parseFloat(userAgent.substring(userAgent.indexOf(' MSIE')+4,userAgent.length));
if (version >= IEvers)
{if (IEpass>0) newURL=(IEpass==1)?URL:altURL;}
else {if (IEnoPass>0) newURL=(IEnoPass==1)?URL:altURL;}
} else if (OBpass>0) newURL=(OBpass==1)?URL:altURL;
if (newURL) { window.location=unescape(newURL); document.MM_returnValue=false; }
}
//-->
</script>


<body onload="MM_checkBrowser(4.0,2,2,4.0,2,2,0,'index.h tml','mac_users.html');return document.MM_returnValue">
<div id="goldenball_splash" onfocus="MM_checkBrowser(4.0,1,2,4.0,2,2,0,'index. html','mac_users.html');return document.MM_returnValue">
Reply With Quote