Jonathan, I see that you want an outside of applet function doing this work on an unknown number of applets. This could be handled by having each applet's Jmol Javascript function set a unique global variable (in an array) to true (or whatever). Even though the applets may complete loading randomly, I'm betting that their position in the document.applets array is sequential in Web page order. Your external function could then use document.applets.length to query these variables.
Again in betting mode, I'd guess that calling the query function from a body onload would catch all the applets. In other words, that the document.applets array is complete on page load even if some of the applets are still "filling up." Otis On 6/14/2010 11:42 AM, Otis Rothenberger wrote: > Jonathan, > > There are three issues that I've encountered doing this. > > 1) There is the standard applet loaded issue. > 2) With Jmol the is also the post applet load issue of model loaded. > 3) MSIE (see below) > > By catching step 2 above in Jmol, you are really covering issue 1 and 2. > You do this by calling a JavaScript function ( e.g. JmolLoaded() ) at > the end of the Jmol Load script using the Jmol JavaScript command. > JavaScript does not get this call until 1 and 2 are both complete. It > works very nicely. > > HOWEVER, MSIE > > MSIE seems to completely ignore the Jmol Javascript command. The only > way I've found around this is to use browser sniffing and write a clumsy > Timeout routine to call the JmolLoaded() function in MSIE > > Otis > > > On 6/14/2010 9:36 AM, Jonathan Gutow wrote: > >> A question for you javascript mavens. >> >> I'm trying to help the SageMath people with their Jmol interface. I need to >> get some information about directories through the messageCallBack mechanism >> and am running into issues with the order applets are loaded. When a page >> with many applets is loading the load order is unpredictable and I am >> finding that the message callback information seems to get garbled as to >> which applet the message comes from (maybe the messages are overlapping). I >> have no way of knowing ahead of time how many applets are on a page as they >> are created on the fly by the server. >> >> Anyway. I think my problem would be solved if I could simply run a function >> that queries each applet in sequence _after_ they have all loaded, rather >> than having each applet send a message callback as it finishes loading. So >> I'm looking for a way to know that the page is ready for me to do this. >> >> Any ideas? >> >> Thanks, >> Jonathan >> Dr. Jonathan H. Gutow >> Chemistry Department [email protected] >> UW-Oshkosh Office: 920-424-1326 >> 800 Algoma Boulevard FAX:920-424-2042 >> Oshkosh, WI 54901 >> http://www.uwosh.edu/facstaff/gutow >> >> >> ------------------------------------------------------------------------------ >> ThinkGeek and WIRED's GeekDad team up for the Ultimate >> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the >> lucky parental unit. See the prize list and enter to win: >> http://p.sf.net/sfu/thinkgeek-promo >> _______________________________________________ >> Jmol-users mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/jmol-users >> >> >> > -- Otis Rothenberger chemagic.com ------------------------------------------------------------------------------ ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo _______________________________________________ Jmol-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jmol-users

