[Javascript] Layers

Andrew Dunn adunn at mail.interworx.com.au
Thu May 17 08:08:21 CDT 2001


Thank you for this Peter I found it very useful.

-----Original Message-----
From: javascript-admin at LaTech.edu [mailto:javascript-admin at LaTech.edu]On
Behalf Of Peter-Paul Koch
Sent: Thursday, 17 May 2001 6:27 PM
To: javascript at LaTech.edu
Subject: RE: [Javascript] Layers



>function checkBrowser()
>{
>	if(navigator.userAgent.indexOf("MS") != -1)
>	{

*** Don't use a browser detect, use a support detect. ***

This function does not work in Netscape 6, Opera and Konqueror while they
can easily handle the script. Why don't you give them a chance to execute
it, too?

For information on how to avoid this, see
http://www.xs4all.nl/~ppk/js/index.html?support.html (for general info about
support detection) and
http://www.xs4all.nl/~ppk/js/index.html?dom.html (the three DOMs you need
for cross-browser DHTML).

This is really a very important topic, so please read these pages carefully.

>Can anyone see the flaw that would cause netscape to crash? This works fine
>in IE.

The flaw is not in the JavaScript, probably in the style sheets.

Step 1) Remove all border declarations from the style sheets, see if that
helps.
Step 2) If it doesn't, try to reduce the number of layers (or do you have
only 2?)
Step 3) If it still doesn't work, post a URL so we can take a look.

ppk

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


_______________________________________________
Javascript mailing list
Javascript at LaTech.edu
http://www.LaTech.edu/mailman/listinfo/javascript





More information about the Javascript mailing list