[thelist] javascript syntax

Joshua Olson joshua at waetech.com
Thu May 9 13:13:01 CDT 2002

----- Original Message -----
From: <dn at dittodesign.co.uk>
Sent: Thursday, May 09, 2002 1:58 PM
Subject: Re: [thelist] javascript syntax

> cheers guys,
> > if (navigator.platform=='mac'){window.location='NS/index.htm';}
> doesn't work neither does
> top.location.href = 'NS/index.htm';
> I've tried both in a variety of combinations without much luck.


A trick I use when something isn't working is to make sure the code is
actually firing.  Add an alert(navigator.platform); before the if statement
or within the brackets:

alert(navigator.platform == 'mac');
if (navigator.platform=='mac')

You should get two popups.


More information about the thelist mailing list