Kokuho , there is an important differemce between
>     jmolApplet([650, 450], "load \"" + val + "\"");
and
>     jmolApplet([650, 450], "load @val");

The first uses a Javascript variable, while the second (tries to) use a 
JmolScript variable.

Regarding the quotes, Jmol needs double quotes (but they are optional in most 
cases). The 
backslash is just javascript way of including one set of double quotes inside 
another. You 
could also do
        jmolApplet([650, 450], 'load "' + val + '"');
(note the single quotes there)
or, as long as your filepath+name has no troublesome characters, even
        jmolApplet([650, 450], 'load ' + val);

> And, is this the way I should use variables in any script command?

Yes, as long as they are Javascript variables and you are writing your code in 
the page 
source code using Javascript. You example sounded like you wanted to use 
JmolScript 
variables, which is another business.

Finally, it is recommended that you use
        jmolInitialize("../", true);
since that will download only the needed components of the (signed) applet, so 
reducing the 
page load time --and memory load--. When you use "JmolAppletSigned.jar" as the 
second 
parameter you are requesting the full applet in one go.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to