?
Solved

Applet Loaded???

Posted on 1998-05-07
2
Medium Priority
?
513 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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

In my daily work (mainly using ASP.net), I need to write a lot of JavaScript code. One of the most repetitive tasks I do are the jQuery Ajax calls. You know: (CODE) I don't know if for you it's the same, but for me is soooo tedious to write the …
Article by: DanRollins
This article describes a JavaScript program that creates a maze made of hexagonal cells.  In Part 2 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7850-Hex-Maze-Part-2.html), we'll extend the program by adding a depth-…
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…
Suggested Courses

864 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