I developed an applet and I reload it when it finishes some task. I accomplished that using javascript:
function startApplet() {
// code to setup "object" tag
var appletHtml = '<object name= ....'
document.getElementById("applet_tag").innerHTML = appletHtml;
}
function restartApplet() {
if (document.getElementById("applettag")) {
document.getElementById("applet_tag").innerHTML = '';
}
startApplet();
}
That works perfectly in some machines but in others the javascript code is executed but the applet doesn't reload (disappear current instance, start a new one)
I already tried with <param name="cache_option" value="no"> or using jquery code to reset applet div with no success.
Anyone knows about this issue or knows another way to reload the applet without refreshing page?
Edit: More info about issue:
Looking at Java console, I infer that applet efectively restart, but I think I need that the applet restart in a new JVM instance. Below, I attached an extract of the java console:
basic: Applet loaded.
...
basic: Applet initialized
basic: Starting applet
...
basic: Applet started
basic: Told clients applet is started
basic: Starting applet teardown
basic: Finished applet teardown
basic: Removed progress listener: sun.plugin.util.ProgressMonitorAdapter@d062ed
basic: PluginMain.unregisterApplet: 1 from mananger sun.plugin2.applet.Applet2Manager@ca5165
basic: Added progress listener: sun.plugin.util.ProgressMonitorAdapter@185c219
basic: Plugin2ClassLoader.addURL parent called for http://...
basic: Applet loaded.
basic: Applet resized and added to parent container
basic: PERF: AppletExecutionRunnable - applet.init() BEGIN ; jvmLaunch dt 359544 us, pluginInit dt 55298741 us, TotalTime: 55658285 us
Applet inicializado
basic: Applet initialized
basic: Starting applet
basic: completed perf rollup
basic: Applet made visible
basic: Applet started
basic: Told clients applet is started