Hi all,
apologies if this should be in the beginners section.
I'm trying to call an applet method from Javascript, the call works OK, but the method is returning a value before the main section of the applet code has executed, causing the wrong value to be returned. I would appreciate any guidance:

Applet code (relevent sections only)

public class BandwidthTestApplet extends Applet {
...
public static boolean usrHighBand = false; //this is problem variable
...

public void start(){
...some calculations and stuff
these ulimately change the usrHighBand varaible
}

public boolean getClientBandwidth(){ //method called by javascript
return usrHighBand;
}
}
What seems to be happening is that the javascript is calling the method before the applet has done anything, so returns false. If the page is refreshed the value returned is the one that should have been returned the first time round. Am i being stupid here and missing something obvious, or is there a way to force my script to execute after the applet has finished?

Cheers for any help.
Jim