Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Applet Loaded???

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

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

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

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
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…

610 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