Solved

Applet Loaded???

Posted on 1998-05-07
2
510 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

In this article, we'll look how to sort an Array in JavaScript, including the more advanced techniques of sorting a collection of records either ascending or descending on two or more fields. Basic Sorting of Arrays First, let's look at the …
This article discusses how to implement server side field validation and display customized error messages to the client.
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…

688 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