Why do you need to determine if NS6 is being used?
navigator.appVersion returns 5.0 (Windows; en-US) for ns 6 and 4.02 [en] (WinNT; I ;Nav) for ns 4.2 so
with ns6
var ns = (document.layers)? 1: 0;
is set to 0 !
Code:
var app = navigator.appName;
var ver = navigator.appVersion;
document.write(app + "<BR>")
document.write(ver+ "<BR>")
var ie4 = (document.all)? true : false;
var ns4 = (document.layers)? true : false;
var ns = (app == "Netscape");
var ns6 = ns && (navigator.appVersion.charAt(0)== 5)? true : false;
document.write('IE 4: ' + ie4 + "<BR>");
document.write('Netscape: ' + ns + "<BR>");
document.write('Netscape 4: '+ ns4 + "<BR>");
document.write('Netscape 6: ' + ns6 + "<BR>");
this displays:
IE5:
Code:
Microsoft Internet Explorer
4.0 (compatible; MSIE 5.01; Windows NT)
IE 4: true
Netscape: false
Netscape 4: false
Netscape 6: false
netscape 4:
Code:
Netscape
4.02 [en] (WinNT; I ;Nav)
IE 4: false
Netscape: true
Netscape 4: true
Netscape 6: false
netscape 6:
Code:
Netscape
5.0 (Windows; en-US)
IE 4: false
Netscape: true
Netscape 4: false
Netscape 6: true
is this of any help to you?