Bugs item #902696, was opened at 2004-02-23 10:02
Message generated for change (Comment added) made by einarc
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=379133&aid=902696&group_id=23629
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Egon Willighagen (egonw)
Assigned to: Miguel (migueljmol)
Summary: Website scripting applets searches models in applet dir
Initial Comment:
The applets in scripting/ access the models in the
applet/ directory. The script commands used do not
refer to any dir, so I copied (bad workaround) the
files for the scripting/ applets into the applet/
dir. Miguel, can you have a look at this?
----------------------------------------------------------------------
Comment By: Einar Coutin (einarc)
Date: 2006-03-17 17:58
Message:
Logged In: YES
user_id=1475990
What Egon says it absolutely true. It doesn't matter if you
use Jmol.js or load the applet using html, you need to place
your data file sinto the directory where jmol initializes in
order for the applet to load the molecule. See this example:
<html>
<head>
<title>UI Controls example</title>
<script language="JavaScript"
src="../jmol/Jmol.js"></script> <!-- REQUIRED -->
</head>
<body>
<form> <!-- form tags should always be used around UI
controls -->
<script>
jmolInitialize("../jmol");
jmolCheckBrowser("popup", "../../browsercheck",
"onClick");
jmolSetAppletColor("skyblue"); // if you don't want
black
// 200x200 & file from another directory
jmolApplet(200, "load ../jmol/caffeine.xyz");
jmolBr();
// a radio group
jmolHtml("atoms ");
jmolRadioGroup([
["spacefill off", "off"],
["spacefill 20%", "20%", "checked"],
["spacefill 100%", "100%"]
]);
jmolBr();
// a button
jmolButton("reset", "Reset to original orientation");
jmolBr();
// a checkbox
jmolCheckbox("spin on", "spin off", "spin");
jmolBr();
// a link
jmolLink("move 360 0 0 0 0 0 0 0 2", "Rotate once about the
x axis");
jmolBr();
// a menu
jmolMenu([
"background white",
["background skyblue", null, "selected"],
"background yellow",
"background salmon",
"background palegreen",
"background black"
]);
</script>
</form>
<applet name="jmol" code="JmolApplet"
archive="../jmol/JmolApplet.jar" width="400" height="400">
<param name="progressbar" value="true">
<param name="load" value="../jmol/caffeine.xyz">
</applet>
</body>
</html>
You can get the file fomr the SVN
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=379133&aid=902696&group_id=23629
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Jmol-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-developers