Hi.
We use the following script code (below) to identify if WebStart is installed. This was mostly found in various formats on SUN sites.
This worked fine for us until JRE6 is installed.
Problem:
With JRE6, on FIREFOX(2.0.0.3), the web-page continually reloads due to this portion of javascript code:
if(checkPlatform("win")) {
navigator.plugins.refresh(true);
This still works fine in IE.
If we remove JRE6 and revert to the still installed JRE 1.5.0_10, then behaviour in Firefox returns to normal.
I am puzzled why the presence of JRE6 would cause this to occur, and would appreciate any comments/suggestions.
thanks,
--geoff
----Javascript code sample follows-----
var javawsInstalled = 0;
var isIE = "false";
if (navigator.mimeTypes && navigator.mimeTypes.length) {
if (webstartVersionCheck("1.2")) {
javawsInstalled=1;
}
else {
if (checkPlatform("gecko") || checkPlatform("opera")) {
javawsInstalled=1;
}
else {
javawsInstalled=0;
}
}
}
else {
isIE = "true";
}
function webstartVersionCheck(versionString) {
// Mozilla may not recognize new plugins without this refresh
if(checkPlatform("win")) {
navigator.plugins.refresh(true);
}
// First, determine if Web Start is available
if (navigator.mimeTypes['application/x-java-jnlp-file']) {
// Next, check for appropriate version family
for (var i = 0; i < navigator.mimeTypes.length; ++i) {
pluginType = navigator.mimeTypes.type;
if (pluginType == "application/x-java-applet;version=" + versionString) {
return true;
}
}
}
}
function checkPlatform(string)
{
return detect.indexOf(string) + 1;
}
<SCRIPT LANGUAGE="VBScript">
on error resume next
If isIE = "true" Then
If Not(IsObject(CreateObject("JavaWebStart.isInstalled"))) Then
javawsInstalled = 0
Else
javawsInstalled = 1
End If
End If
</SCRIPT>