• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Check for existance of JSObject document

 
J Gib
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I made an applet which basically works in conjunction with another third party applet. When my applet loads it starts a Thread which sleeps every second and acts as a listener to the third party applet. The problem is that sometimes my applet loads before the other applet can even begin loading which sends an error when it trys to communicate with it.
I have gotten around the problem by having my "listener" thread sleep for a few seconds upon loading, but i feel like this isnt the best solution.
Is there a way to check to see if an applet/document exists? i've tried:

But it doesn't work. It compiles fine, but i get an error everytime my applet loads before the other one can. Any suggestions? Thanks.
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15482
43
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is that JavaScript code? If yes, please note that JavaScript is something completely different than Java, even though the names of those two programming languages have similar names.

You'd probably get more useful answers if you ask the question in a forum about JavaScript instead of Java. Also, on which browser are you trying to run this?
[ July 28, 2006: Message edited by: Jesper Young ]
 
J Gib
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Well i guess you'd say that is Java code using Javascript through JSObject. I'm running it on IE.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic