Problem using AJAX with a Java Applet
Posted
by diglettpotato
on Stack Overflow
See other posts from Stack Overflow
or by diglettpotato
Published on 2010-03-28T09:13:31Z
Indexed on
2010/03/28
9:23 UTC
Read the original article
Hit count: 262
I currently have a Java Applet which contains a method callfromjs(). Javascript calls this method from the applet so that I don't have to deal with the clunky applet GUI, and then I can create the responses on the DOM easily from javascript.
The problem is that the browser hangs while first loading the applet. To get around this, I figured I could use AJAX. The AJAX calls a PHP file which contains callfromjs(). The problem is that the request returns because it's PHP, and it doesn't wait for callfromjs() to retrieve the content.
On to my questions:
- Is there a better way to handle this?
- If this method seems ok, how can I force the request not to return until the javascript is finished calling the method from the applet?
© Stack Overflow or respective owner