View Single Post
 
Old January 20th, 2007, 09:55 AM
Adam H-W Adam H-W is offline
Friend of Wrox
 
Join Date: Jun 2003
Location: , , .
Posts: 347
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Adam H-W
Default browser detection

Hi there

I'm using a browser detection script like this:

if (is.nav5up) {
  document.write('<'+'link rel="stylesheet" href="style-moz5.css" />');
}
else if (is.nav4) {
  document.write('<'+'link rel="stylesheet" href="style-nav4.css" />');
   }
else if (is.ie5up) {
  document.write('<'+'link rel="stylesheet" href="style-ie5.css" />');
}
else if (is.ie4) {
  document.write('<'+'link rel="stylesheet" href="style-ie4.css" />');
}
else if (is.ie3) {
  document.write('<'+'link rel="stylesheet" href="style-ie3.css" />');
}
else if (is.opera) {
  document.write('<'+'link rel="stylesheet" href="style-op.css" />');
}

I need to check whether the user is using both Safari and IE on a Mac Platform - what is the correct coding for that in terms of

else if (is.IEonaMac)

and

else if (is.Safari)

thanks

Adam