Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Loading 2 applets on one page

Status
Not open for further replies.

JKehoe

Programmer
Feb 8, 2001
17
0
0
US
Hello,

I'm fairly new to JavaScript and Applet programming and I need some advice. I have an application that loads (2) applets on the same page simultaneously. The problem I have is that one applet loads faster than the other and when the faster one is done, it requests information from the second applet. Since the second applet has not fully loaded yet, I get errors.

My question is, how do I wait until one applet has completely loaded before loading the second (faster) applet?

Thanks in advance,
j--
 
Since the code that actually loads the applets is written in JavaScript on an .html page, I thought this was a JS question. The applets themselves (written in Java) run fine.

Anyway, I was able to fix this problem by writing a setInterval loop (in my .html file) and waiting until both applets were fully loaded until I made my applet method calls. Probably not the best way to do it, but it works. Anyone have a better suggestion?

Thanks,
j--
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top