aspose file tools*
The moose likes Applets and the fly likes too much data Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "too much data" Watch "too much data" New topic
Author

too much data

Robert Kennedy
Ranch Hand

Joined: Jun 27, 2008
Posts: 63
Hello,

I am sending a string from a class in my applet to a javascript function in a web browser (in this case IE6-XP sp2).

If the string reaches a certain threshold (about 10 kb) the browser crashes with the following message: "Internet Explorer has encountered an error and needs to close."

The data received in the javascript function is repainted to an html display. To narrow down the cause I have limitedthe amout of data which is being repainted to a few lines.

The applet is simply a dot on the page which facilitates communication and data transfer, it is not the gui.

Is there a limit - threshold which must be respected when calling a javascript function from an applet class?
Robert Kennedy
Ranch Hand

Joined: Jun 27, 2008
Posts: 63
Also I am curious. What happens when an applet calls a javascript function.

Is the data passed to the browser which handles the request?
or does the applet thread actually handle the request?

What happens if multiple calls are initiated before the browser or applet thread returns?

Is a new thread instantiated?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42945
    
  68
Well, it can't be the applet handling the thread, because it's happening in JavaScript.

I'm not sure about JavaScript's multithreading capabilities, or the amount of data it can handle, but years of experience taught me that LiveConnect (which is how the Java/JavaScript integration is called) is brittle under the best of circumstances. And even if you figure out what you can get away with in IE, might well break in other browsers, and vice versa. So, I'd try hard to keep it simple and small.
Robert Kennedy
Ranch Hand

Joined: Jun 27, 2008
Posts: 63
Thanks. I tried different pcs and there does not appear to be an issue with data size. My pc has some visual studio dugging tools on it which causes IE to misbehave.

I am curious about the multi threading relationships in Javascript.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: too much data