• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Ajax and Java Applet crashes FireFox 1.5

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have an problem, it is related to a CMS system that submits a form and written text in an java WYSIWYG editor.
To close the form (remove the form from the screen) we clear the HTML content of this screen area. For this we use the following javascript code in our PHP application:

area.innerHTML = "";

The area is an object that contains the form. When we run this command and this area contains a java applet - the browser crashes. This happens with ALL browsers. In order to avoid a browser crash we need to destroy/close the java applet first. After this the above code works fine without any issues. In order to destroy the java applet we use the following code:

area.style.display = "none";

So we have the following lines of code

area.style.display = "none";
area.innerHTML = "";

In all browsers including the old versions of the FireFox browser the second command is executed only after the first command is completed (java applet is destroyed). In the new version of FF the second command is executed before the first command is fully completed that cause the browser to crash.

This is complete describe of the issue we have. If I could get some tips or suggestions that would help me to destroy the java applet this would solve the issue. There is one suggestion I foresee that can't be applied: use setTimeout function to emulate pause. The code execution can't be stopped using this function in our system without serious modifications of code.

I think I forgot a mayor detail to explain my reason. This is a application that uses Ajax technologies, particular Json-rpc. Therefore if you submit the info in the editor and it loads the list of created items, it does not actually load a new page but uses json to plug in the new content. But each time the java applet need to be closed and this crashes the browser in the new version of FF.

Best wishes,
Thom
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can try doing something like this to remove the elements



call it to remove all of the children
removeChildrenRecursively(document.getElementById("YouSpanDivId"));

It will be slower this way, but worth a shot. You could also try using rmeove child just on the applet.

document.getElementById("YouSpanDivId").removeChild(document.getElementById("appletId"));

If that does not work, I will see if I can find something else for you to try.

Eric
 
Author
Posts: 85
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hmmm, I don't know if this is your case... BUT

I was digging around using Google search "applet crashes Firefox". It seems that you are in company of an applet crashing Firefox. One thing that people seemed to keep mentioning was checking to make sure that only one version of Java was installed. Do you have multiple versions of Java?

Christian
 
Thom Bernthaler
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

thanks for the reply and suggestion.
But we tried to use a similar code a few months ago when we searched our solution for the browser crash issue we have. It did not work. Only display.style="none" did help but unfortunately this does not work in the new FF.

About the java versions, it does not matter since the applet works fine without problem just when you go to the next page it needs to close the applet and load a new screen and this crashes the browser.

Thanks guys, I appreciate the suggestions,
Thom
 
Arch enemy? I mean, I don't like you, but I don't think you qualify as "arch enemy". Here, try this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic