[thelist] javascript syntax

dn at dittodesign.co.uk dn at dittodesign.co.uk
Thu May 9 14:37:00 CDT 2002


thank you one and all, particularly Dave & Joshua
for the alert tip and Hassan for the case sensitivity reminder.
I'm not a javascripter but find I can tinker with scripts to get
them to do what I want, mostly.

the wining combination.

if (navigator.platform=='MacPPC'){  window.location='NS/index.htm';}

I feel like a safe cracker =9-)
it was down to the whole upper lower case shenanigans. :-(

now if somebody with a mac could just test it for me:-)))

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

if it works the title bars are blue otherwise they're white.

tia

Darren

----- Original Message -----
From: "Joshua Olson" <joshua at waetech.com>
To: <thelist at lists.evolt.org>
Sent: Thursday, May 09, 2002 7:27 PM
Subject: Re: [thelist] javascript syntax


> ----- 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.
>
> Darren,
>
> 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);
> alert(navigator.platform == 'mac');
> if (navigator.platform=='mac')
> {
>   window.location='NS/index.htm';
> }
>
> You should get two popups.
>
> HTH,
> -joshua
>
>
>
> --
> 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