[thelist] Mac detection with Javascript

Paul Backhouse paul.backhouse at 2cs.com
Thu Jun 27 10:31:10 CDT 2002

Ive sorted it out using this code if anyone interested:

<script language="javascript">
version = navigator.appVersion;
if (version.toLowerCase().indexOf("win")!=-1) document.write('<img
src=images/spacer.gif width=1 height=1 border=0>');
else if (version.toLowerCase().indexOf("mac")!=-1) document.write('<img
src=images/spacer.gif width=1 height=52 border=0>');
else document.write('<img src=images/spacer.gif width=1 height=52

-----Original Message-----
Anyone know how to detect Mac operating system with javascript and then do a

I have IE, NS and Mac problems on one page - sizes of heights are different
in one area - i need to have 3 seperate values, Height for IE, Height for NS
and Height for Mac and I need to do it in Javascript as the server this site
will be hosted on is LAME and the customer won't listen to reason and
upgrade and pay LESS! Go figure!

Anyway - life has become very difficult with all the design and
functionality they want and the useless server they are using - I've cracked
everything apart from this Height issue and I will not be beaten by 10 lousy
pixels after the stuff I've been through on this site.

Anyone know.

Thanks in advance.



More information about the thelist mailing list