I wasted 4 hours searching and trying, but no luck.
if ((navigator.plugins) && (navigator.plugins.length)) {
for (var xx = 0, l = navigator.plugins.length; xx < l; xx++) {
var tn = navigator.plugins[xx].name;
if (tn.indexOf("Java") != -1) {
document.write("Found ");
}
else {
document.write("Nothing ");
}
}
}
Insteading of writing just “Found” or “Nothing” this script writes the following:
NothingNothingFoundNothing
(there are 4 plugins btw):
How do I fix this so that I only receive one answer? I don’t want other way to find if Java is installed, just the above but working.
Edit:
Thanks both of you, now it’s working.
1 Answer