The page might be considered "loaded" even though the applet isn't. Don't
know for sure, but it might be the case.

Couldn't you get the applet to throw something to the page once loaded which
triggers the JavaScript to run?

Ade

-----Original Message-----
From: Shawn Grover [mailto:[EMAIL PROTECTED]]
Sent: 25 April 2002 22:01
To: CF-Talk
Subject: RE: Determining if a java applet has been loaded in JS?


Yes, OnLoad fires after the page is loaded, but We are finding that doesn't
necessarily apply to java applets.  We do our initialization from the OnLoad
event, and yet we find the applet is not loaded yet.

-----Original Message-----
From: David DiPietro [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 25, 2002 2:24 PM
To: CF-Talk
Subject: RE: Determining if a java applet has been loaded in JS?


I believe the onload="checkForMyApplet('appletName')"
With some function would do the trick since onload happens at the end
of the page loading.

David DiPietro
Systems Developer / Engineer
OSU College of Medicine & Public Health
Voice (614) 292-5960
Fax (614) 292-0745


-----Original Message-----
From: Shawn Grover [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 25, 2002 4:01 PM
To: CF-Talk
Subject: OT: Determining if a java applet has been loaded in JS?


we have a case where a java applet may take a few seconds to load, but need
to use JS to set/adjust the applet when the page loads.  We are finding that
sometimes the JS code will execute before the applet has been loaded,
therefore causing errors (cuz the applet doesn't exist yet).

We have toyed with the idea of building in a delay on our page before this
initialization code runs, but have decided that this is not a good idea.
How long should the delay be? What if the user is on a 28.8 modem? or a DSL
line? the delay would need to change.

So, we are looking for ideas/methods on how to check if the applet has
infact loaded before doing any processing.  We think something like:

if (document.all.AppletName) { do something }

But are not sure if this reference to the applet would cause an error if the
applet isn't loaded yet.

Are there any other methods? Thanks in Advance.

Shawn Grover




______________________________________________________________________
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to