Re: Javascript usage in site (for new windows and NS-CSS)

by "apathetic" <tmbkr(at)>

 Date:  Sat, 29 Dec 2001 10:51:07 -0000
 To:  "Jay Smith" <jay(at)>
 Cc:  <hwg-techniques(at)>
 References:  JaySmith
  todo: View Thread, Original
> In Netscape 4.7x
> (at least), if Javascript is turned off then CSS is also turned off
> because NS uses Javascript to make their CSS handling I guess.

Thats exactly the reason.  A good explanation of why can be found at:

> When
> that happens, my site goes to pieces.  Any ideas of how to cope with
> this reality -- or just don't worry about it?

I really wouldn't worry about it.  Not many people use Netscape 4, and even
less will have JavaScript turned off.

> How does one 'sniff' for Javascript being on or off (in various
> browsers)?

Pretty simple.  Make your front page up with a message explaining how to
turn JavaScript on, and then use JS to redirect immediately to the proper
front page.  Eg:


    <script language="javascript">

    window.location = '/index2.html';




    <p>Blah blah how to turn JavaScript back on blah blah</p>


This way, a use with JS turned off will see the message, and a user with it
turned on will be immeditately redirected before they see the message.


HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA