Hi all,
So here's something new that's confusing me. I am loading a multi-structure
mol2 file. That's as simple as it gets, right? That's what I thought too till
safari spoke. In Firefox3, the molecule loads no problem. In safari, it
doesn't.. *unless* I put in an alert message right before the load command.
Below is the barebone of my code. It seems like something is out of sync in
safari that I need to slow it down (alert message) for the script to catch up.
Help. Thanks.
-Rob
----
<html>
<head>
<script src="/submit/jmol-11.6.RC15/Jmol.js"></script>
<script type="text/javascript">
function loadLigands(structure) {
var load_script = "load " + structure + ";select all; spacefill 20%;
wireframe 0.35;";
//alert(load_script); // ------UNCOMMENT THIS ALERT MESSAGE TO GET IT
TO WORK IN SAFARI-----
jmolScript(load_script);
}
function messageCallback(app, msg) {
msg = "" + msg+""; /* convert callback message into string (recommended
by other Jmol users) */
if (msg.match(/ScriptException/)) {alert("=== Jmol SCRIPT ERROR ===\n" +
msg);}
else if (msg.match(/java\.security\.AccessControlException/)) {alert("===
Java Error ===\nA Java error prevented loading of the structure");}
else if (msg.indexOf("ERROR")>=0 && msg.indexOf("load >>") >= 0)
{alert(msg);}
}
</script>
</head>
<bod>
<body
onload="loadLigands('file:///Library/WebServer/Documents/toy/vs_analysis/result0.mol2');">
<script type="text/javascript">
jmolInitialize("/submit/jmol-11.6.RC15/", "JmolAppletSigned.jar");
jmolSetCallback("messageCallback","messageCallback");
jmolApplet([600, 450]);
</script>
<!-- end jmol -->
</body></html>
_________________________________________________________________
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users