Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Ajax
Ajax the combination of XHTML, CSS, DOM, XML, XSLT, XMLHttpRequest, and JavaScript
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Ajax section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old February 24th, 2006, 10:25 AM
Registered User
Join Date: Feb 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default close java applet causes browser to crash


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. Therefor 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,

Similar Threads
Thread Thread Starter Forum Replies Last Post
Browser close when screen saver close Rehanrana Pro VB 6 1 April 7th, 2008 03:09 AM
Applet needs full browser pane w/ DOM access. Philibuster BOOK: Beginning Java 2 1 August 15th, 2006 09:22 PM
java applet trick convet to c# chall3ng3r General .NET 0 February 8th, 2005 11:22 PM
Cr8 & Stored procedure ..Crash ..Crash swissaKM Crystal Reports 0 January 2nd, 2005 06:02 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.