aspose file tools*
The moose likes Beginning Java and the fly likes Check for existance of JSObject document Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Check for existance of JSObject document" Watch "Check for existance of JSObject document" New topic
Author

Check for existance of JSObject document

J Gib
Greenhorn

Joined: Jul 20, 2006
Posts: 5
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

Joined: Aug 16, 2005
Posts: 14104
    
  16

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 ]

Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
J Gib
Greenhorn

Joined: Jul 20, 2006
Posts: 5
Hi,
Well i guess you'd say that is Java code using Javascript through JSObject. I'm running it on IE.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Check for existance of JSObject document