OnClick='jmolScript("load ?; script scripts/name.spt; background
white") + removeAllModels() + loadModels()'
adds function returns in JavaScript. I think you want semicolons. Generally
good programming is to only have a single function in the onclick:
OnClick='onClickLoadStruc()'
and then
function onClickLoadStruc() {
jmolScript("load ?; script scripts/name.spt; background white")
removeAllModels()
loadModels()
}
Remember that jmolScript() is asynchronous -- it queues the load command but
continues immediately. You want:
function onClickLoadStruc() {
jmolScriptWait("load ?; script scripts/name.spt; background white")
removeAllModels()
loadModels()
}
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 Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users