Yaron C. wrote:
Is there is a way to detect Service Pack 2 for XP in JS ?
Can I know it from navigator.userAgent ?
With IE 6 it seems that
navigator.appMinorVersion
contains
SP2
if Windows XP service pack 2 is installed thus the check
if (navigator.appMinorVersion &&
navigator.appMinorVersion.toLowerCase().indexOf('S P2') != -1) {
// it is SP 2
}
should help (as long as not any other browser vendor on another platform
decides to use that property and put SP2 into it for some reasons).
I don't think other Windows browsers care about the service pack and
indicate it in some navigator property.
And even with IE you are probably better off if you simply do object
checking e.g.
var win = window.open('whatever.html');
if (win != null && !win.closed) {
// manipulate window here
}
--
Martin Honnen
http://JavaScript.FAQTs.com/