[Javascript] RES: (no subject)

David Hucklesby davidh126 at writeme.com
Wed Aug 29 13:55:41 CDT 2007


On Tue, 28 Aug 2007 20:04:01 -0300, SosCpdGMail wrote:
> Oooops... Here come again with the missed necessary step:
>
>
> This may help you somehow:
>
> var ns=(document.layers);
> var ie=(document.all);
> var w3=(document.getElementById && !ie);
>
>
Umm. Not quite. 

For example, your "ns" refers to Netscape 4. You are not very likely
to get much JS working there, even if you actually come across that 
browser in the wild.

Your test for IE works for more browsers than IE, which now supports
DOM methods anyway, as do other browsers that recognize document.all.

Browser sniffing is far too fragile - I suggest you use object 
detection instead.

Cordially,
David
--





More information about the Javascript mailing list