Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Javascript General Javascript discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old January 20th, 2007, 09:55 AM
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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cash Drawer Detection imcityhunter VB How-To 2 April 24th, 2007 05:20 PM
flash detection catchrohith Classic ASP Basics 0 November 18th, 2006 01:29 AM
Browser RSS feed auto detection code here madok BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 0 September 29th, 2006 09:04 AM
windows login detection atrash C++ Programming 1 July 28th, 2006 05:10 AM
File extension detection RichardOrmiston ASP.NET 1.0 and 1.1 Basics 2 November 2nd, 2005 11:46 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.