Skip to main content

Detecting disabled plugin

3 replies [Last post]
bryanyoung
Offline
Joined: 2004-07-05

I have been playing with deployJava.js for the first time today. I'm pretty happy with it. It's been needed for a long time.

I do have one feature request though... It would be nice if I could detect if the plugin is installed but disabled. Firefox has an option to disable Java, but getJREs() still returns the JRE name. It would be nice to know, so I could display a message, a static image, etc.

I'm not even sure if Firefox exposes this, or if the same problem exists in other browsers. I just thought I'd ask.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
dangi
Offline
Joined: 2007-12-11

I use this one:

function javaEnabledInNavigator() {
if (typeof navigator != 'undefined' && typeof navigator.javaEnabled != 'undefined')
return navigator.javaEnabled();
else
return false;
}

bryanyoung
Offline
Joined: 2004-07-05

Thanks, that will be helpful.

It seems like this should be built into deployJava.js though. If I ask for a list of available JREs on a given client, I wouldn't expect to get a plugin that is disabled.

andyherrick
Offline
Joined: 2005-04-17

The problem here is that when requesting list of JREs, the script doesn't necessarily know if you want to launch an applet or a webstart application, but we will consider adding functionality to detect if plugin is enabled. We will also be adding function to detect if it is the old plugin, or the new generation out of proc plugin that is enabled.

/Andy