• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Check for existance of JSObject document

 
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.
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • 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.
 
Crusading Chameleon likes the size of this ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic