[thelist] javascript syntax (mac test please)

dn at dittodesign.co.uk dn at dittodesign.co.uk
Thu May 9 16:12:00 CDT 2002


Thanks again to everybody for all the replies.
final, final, final version I hope -

(navigator.userAgent.indexOf("Mac") != -1){window.location="NS/index.htm";}

Mac test please anybody :-))))

http://www.dittodesign.co.uk/index_flash.htm

tia

Darren

----- Original Message -----
From: ".jeff" <jeff at members.evolt.org>
To: <thelist at lists.evolt.org>
Sent: Thursday, May 09, 2002 9:05 PM
Subject: RE: [thelist] javascript syntax


> darren,
>
> ><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> > From: dn at dittodesign.co.uk
> >
> > > a regular expression search on the navigator.platform.
> >
> > er ?
> ><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
>
> don't sweat it.  a regular expression isn't even necessary.  just test
for
> the substring "mac" within the platform property using the indexOf()
method.
>
> if(navigator.platform.toLowerCase().indexOf('mac') == -1)
> // do something if we find the
> // substring "mac" in the platform
> // property
>
> good luck,
>
> .jeff
>
> http://evolt.org/
> jeff at members.evolt.org
> http://members.evolt.org/jeff/
>
>
> --
> For unsubscribe and other options, including
> the Tip Harvester and archive of thelist go to:
> http://lists.evolt.org Workers of the Web, evolt !




More information about the thelist mailing list