Solved

Applet Loaded???

Posted on 1998-05-07
2
496 Views
Last Modified: 2010-05-18
How does one detect if an applet is loaded when a user clicks a button so that the 'Applet not loaded' error does not appear?
0
Comment
Question by:spivey042698
2 Comments
 
LVL 3

Expert Comment

by:percyn
ID: 1277512
One way is to not display the buttons (in your applet) until the applet is completely loaded.
0
 
LVL 10

Accepted Solution

by:
kollegov earned 50 total points
ID: 1277513
Nope, percyn, problem is in attempt to call applet methods
before applet actually loaded. As applet can continue loading after page itself loaded, you can't call it's methods before
applet will be completly loaded, this causes errors.

Unfortunatly, there is no good solution for this.
But I partitioally solved this problem with MY OWN applets.
you will find some examples in 'Between' section of my site
at http://www.geocities.com/siliconvalley/lakes/8620

Well the Idea is following:
in applet I have boolean variable
boolean isReady=false;
at the end of
applet init() method I set it to true;
After this checking in JavaScript looks so:
(reader is applet NAME attribute)

if(document.reader)
   {if(document.reader.ready)
     {if(document.reader.ready==true)
       { //Do here what you need
         //........
       }
     }  
   }

Well, you see this suppose that you write applet in this way.
If you do not make applet yourself, and use some 'ready' one as is, you can try to find some public variable in this applet which
initialized in init() method and use this variable using same
way.

You will find this example working in my
filereader applet.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will give core knowledge of JavaScript and will head in to your first JavaScript program. I am Durvesh Naik and I am here to deal with this series of JavaScript. I will teach you JavaScript in part wise , as its quite boring to read big…
Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

943 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now