Otis,
I don't know. Everything there looks fine to me. A little tricky having the
timeout there as well. You're getting information three or four different
times, all asynchronously. Not a great idea, if you ask me. So we have:
loadApplet
---> Javascript:JmolInit()
JmolInit()
--> JmolScript(....)
--> SetTimeout("getFormula()",3000)
and also I see this:
jmolScript(scpt);
mepsData = true;
if (moData) { setTimeout("toolMenu()", 1000);
setTimeout("getFormula()", 2000); }
if (!moData) { setTimeout("editMenu()", 1000);
setTimeout("getFormula()", 2000); }
I worry about that. You are making some assumptions about timing. I would
advise:
var ext = ";javascript ' " + (moData ? "tool" : "edit") +
"Menu();getFormula()' ");
jmolScript(scpt + ext);
mepsData = true;
Particularly this could be a problem if someone clicks twice within a second
or two. Or, you could use jmolScriptWait:
jmolScriptWait(scpt);
mepsData = true;
if (moData) {
toolMenu()
} else {
editMenu()
}
getFormula()
That way you know it's done.
maybe.
Bob
>
--
Robert M. Hanson
Professor of Chemistry
St. Olaf College
1520 St. Olaf Ave.
Northfield, MN 55057
http://www.stolaf.edu/people/hansonr
phone: 507-786-3107
If nature does not answer first what we want,
it is better to take what answer we get.
-- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900
------------------------------------------------------------------------------
Download new Adobe(R) Flash(R) Builder(TM) 4
The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly
Flex(R) Builder(TM)) enable the development of rich applications that run
across multiple browsers and platforms. Download your free trials today!
http://p.sf.net/sfu/adobe-dev2dev
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users