Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #14015
| Path | csiph.com!usenet.pasdenom.info!aioe.org!.POSTED!not-for-mail |
|---|---|
| From | "Richard Maher" <maher_rj@hotspamnotmail.com> |
| Newsgroups | comp.lang.java.programmer, comp.lang.javascript |
| Subject | Re: Java7 Applet Status and Event Handlers |
| Date | Sun, 29 Apr 2012 18:01:52 +0800 |
| Organization | HTTP *is* The Box - Let's think outside |
| Lines | 51 |
| Message-ID | <jnj3ij$idv$1@speranza.aioe.org> (permalink) |
| References | <jnbfsm$10q$1@speranza.aioe.org> <jnfrl8$o1d$1@speranza.aioe.org> |
| NNTP-Posting-Host | jOhPn0KFjrxwuMc9OPMmCw.user.speranza.aioe.org |
| X-Complaints-To | abuse@aioe.org |
| X-MimeOLE | Produced By Microsoft MimeOLE V6.00.2900.6157 |
| X-RFC2646 | Format=Flowed; Response |
| X-Notice | Filtered by postfilter v. 0.8.2 |
| X-Newsreader | Microsoft Outlook Express 6.00.2900.5931 |
| X-Priority | 3 |
| X-MSMail-Priority | Normal |
| Xref | csiph.com comp.lang.java.programmer:14015 comp.lang.javascript:13687 |
Cross-posted to 2 groups.
Show key headers only | View raw
"Richard Maher" <maher_rj@hotspamnotmail.com> wrote in message
news:jnfrl8$o1d$1@speranza.aioe.org...
> Ok, the onLoad, onError, and Status attributes all seem to do what it says
> on the tin for Applets with Java7 and FireFox, Opera, and even IE.
> Unfortunately on Chrome, document.getElementById("myApplet") still returns
> before the Applet Object has formed enough so Status is "undefined".
>
> Is there anyway to tell Chrome to wait? Does it have it's own onLoad, or
> onReadyStateChange handlers for Applets?
In case anyone's interested in the outcome, for the sake of Chrome I had to
put a setTimeout poll (hate it!) on the
document.getElementById("appletId").status - for example: -
var waitForAppletDOM = function() {
if (window.console) console.log("in waitForAppletDOM");
var appletStatus = ((chanG.status||undefined) == undefined) ? 0
: chanG.status;
switch (appletStatus) {
case 0:
if (window.console) console.log("case 0");
setTimeout(waitForAppletDOM,250);
break;
case 1:
if (window.console) console.log("case 1");
chanG.onLoad = appletLoad;
chanG.onError = appletError;
break;
case 2:
if (window.console) console.log("case 2");
alert("Applet is already loaded");
break;
case 3:
if (window.console) console.log("case 3");
throw new Error("Error activating Applet");
break;
default:
throw new Error("Invalid Applet status");
}
Needles to say, Windows/Safari is a dead bloody loss :-( Also note that, for
FireFox and Opera, if you do an "alert('some-debug-stuff')" from you
"onError" handler the our browser freezes.
>
> Cheers Richard Maher
>
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Find similar | Unroll thread
Java7 Applet Status and Event Handlers "Richard Maher" <maher_rj@hotspamnotmail.com> - 2012-04-26 20:42 +0800
Re: Java7 Applet Status and Event Handlers "Richard Maher" <maher_rj@hotspamnotmail.com> - 2012-04-28 12:28 +0800
Re: Java7 Applet Status and Event Handlers "Richard Maher" <maher_rj@hotspamnotmail.com> - 2012-04-29 18:01 +0800
csiph-web