Seona,

You could use the following to dyamically apply a style sheet based on the browsers' 
properties:-

<script language="javascript" type="text/javascript">
if (document.all ) {
   document.write('<link href="iestyle.css" rel="stylesheet" type="text/css" />' );
}else{
   document.write('<link href="otherstyle.css" rel="stylesheet" type="text/css" />' );
}
</script>

What I was suggesting before hand was not to rely on the cgi.http_user_agent string 
being correct or being available, but rather test the properties of the browsres 
capabilities :-)

Cheers,
Steve

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Stephen Bosworth
Application Development and Integration
Communication and Information Services
The University of Newcastle, Australia
Phone: 02 4921 6574
Fax: 02 4921 7087
Mobile: 0438 492518
Email: [EMAIL PROTECTED]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

>>> [EMAIL PROTECTED] 5/02/2004 2:27:12 pm >>>
Hi Stephen,

Thanks, but it's not actually for JavaScript. I have some positioning issues
with my menus - the sub-menus display just fine in everything except IE5,
where they overlap the main menu bar and are thus impossible to see or
select. So I want to include a different stylesheet for IE5 users which will
have some different numbers it it.

Cheers,

Seona.
  -----Original Message-----
  From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] Behalf Of Stephen
Bosworth
  Sent: Thursday, 5 February 2004 1:16 PM
  To: CFAussie Mailing List
  Subject: [cfaussie] Re: Finding IE5


  Hi Seona,

  If your doing the detection for javascript capabilities, the best way is
to do it in your javascript, and not rely on the cgi.user_agent string.
This string may not be passed if users have firewalls turned on their
computers.

  Your better off using something like this in your javascript:-

  var ie = document.all?1:0;
  var ie4 = (document.all && !document.getElementById)?  true : false;
  var ns4 = (document.layers)? true : false;
  var ie5 = (document.all && document.getElementById)? true : false;
  var dom = (document.getElementById && !document.all)? true : false;
  var isMac = (navigator.userAgent.indexOf("Mac") != -1)? true : false;
  var ie45 = (ie4 && isMac && navigator.appVersion.indexOf("4.5")!=-1)? true
: false;

  HTH,
  Steve

  --
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  Stephen Bosworth
  Application Development and Integration
  Communication and Information Services
  The University of Newcastle, Australia
  Phone: 02 4921 6574
  Fax: 02 4921 7087
  Email: [EMAIL PROTECTED] 
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  >>> [EMAIL PROTECTED] 5/02/2004 12:01:14 pm >>>
  Hi Seona,

  I use the value of cgi.http_user_agent to determine browser info.

  This link might help...

  http://www.paulsilver.co.uk/code/coldfusion_detect_browser.php 

  HTH,

  Brett
  B)

  Seona Bellamy wrote:
  > Hi guys,
  >
  > I know that there is a way to find out what browser a user is viewing
the
  > page through, and specifically I want to find if they are using IE5 (I
need
  > to put some code there that will hopefully bypass some issues IE5 is
having
  > with my site).
  >
  > So:
  >
  > <cfif something EQ something>
  > ...
  > </cfif>
  >
  > What should my "somethings" be, please?
  >
  > Cheers,
  >
  > Seona.
  > ---
  > Outgoing mail is certified Virus Free.
  > Checked by AVG anti-virus system (http://www.grisoft.com).
  > Version: 6.0.576 / Virus Database: 365 - Release Date: 30/01/2004
  >
  >
  > ---
  > You are currently subscribed to cfaussie as: [EMAIL PROTECTED] 
  > To unsubscribe send a blank email to
[EMAIL PROTECTED] 
  >
  > MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
  > http://www.mxdu.com/ + 24-25 February, 2004
  >


  --
  Brett Payne-Rhodes
  Eaglehawk Computing
  t: +61 (0)8 9371-0471
  f: +61 (0)8 9371-0470
  m: +61 (0)414 371 047
  e: [EMAIL PROTECTED] 
  w: www.ehc.net.au 



  ---
  You are currently subscribed to cfaussie as:
[EMAIL PROTECTED] 
  To unsubscribe send a blank email to
[EMAIL PROTECTED] 

  MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
  http://www.mxdu.com/ + 24-25 February, 2004

  ---
  You are currently subscribed to cfaussie as: [EMAIL PROTECTED] 
  To unsubscribe send a blank email to
[EMAIL PROTECTED] 
  MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
  http://www.mxdu.com/ + 24-25 February, 2004
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.576 / Virus Database: 365 - Release Date: 30/01/2004


---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED] 
To unsubscribe send a blank email to [EMAIL PROTECTED] 



MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
http://www.mxdu.com/ + 24-25 February, 2004

---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
http://www.mxdu.com/ + 24-25 February, 2004

Reply via email to