views:

68

answers:

1

I'm using the Java Deployment Toolkit to deploy a java applet in an iframe.

javaDeploy.js automatically redirects the iframe to the java download page if the users browser does not have the plugin installed however I'd like to give some kind of notice to the user before this happens as its a little weird just to see the java download page there with no notice about why they're seeing it.

Is there any way of hooking into the javaDeploy.js process to display a notice before the iframe gets redirected?

A: 

Ok looks like I can answer this myself actually:

I created a hidden div in the parent with a message informing the user they need to install java. Then in the script that calls javaDeploy.js :

javaAvailable = false;
setTimeout("if(!javaAvailable) {$('#no_java_message', top.document).show()}", 200);
deployJava.runApplet(attributes, parameters);
var javaAvailable = true;
$("#no_java_message", top.document).hide();
thief