rob yang wrote:
> Thanks Rolf for providing an example. It works as expected. BTW, how did you
> display the "Loading, please wait" messages? I like the feedback messages
> that keeps the users from thinking that jmol is doing nothing..
>
They are part of the load script:
set echo waitmessage 0% 100%; echo "Loading PDB file, please wait...";
refresh;
load ...
set echo waitmessage off;
In contrast the "Please wait..." message that appears if any button,
etc. is pressed is achieved by a little addition to the Jmol Javascript
library (Jmol.js):
function jmolScript(script, targetSuffix) {
if (script) {
_jmolCheckBrowser();
if (targetSuffix == "all") {
with (_jmol) {
for (var i = 0; i < appletSuffixes.length; ++i) {
var applet = _jmolGetApplet(appletSuffixes[i]);
if (applet) {
/* ### Addition by Rolf Huehne for 'JenaLib' ### */
script = "set echo waitmessage 0% 100%; echo \"Please wait...\";
refresh;\n" + script + auto_zoom_script + "\n set echo waitmessage off;";
/* ### End of addition by Rolf Huehne for 'JenaLib' ### */
applet.script(script);
}
}
}
} else {
var applet=_jmolGetApplet(targetSuffix);
if (applet) {
/* ### Addition by Rolf Huehne for 'JenaLib' ### */
script = "set echo waitmessage 0% 100%; echo \"Please wait...\";
refresh;\n" + script + auto_zoom_script + "\n set echo waitmessage off;";
/* ### End of addition by Rolf Huehne for 'JenaLib' ### */
applet.script(script);
}
}
}
}
Regards,
Rolf
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users