Thanks a lot Robert. That worked like charm.
Could you pls explain the code. Why the backslashes and double quotes?
And, is this the way I should use variables in any script command?
Thanks
On Sun, Aug 16, 2009 at 1:27 AM, Robert Hanson <[email protected]> wrote:
> jmolApplet([650, 450], "load \"" + val + "\"");
>
> On Sat, Aug 15, 2009 at 10:02 AM, Kokuho Rice <[email protected]>wrote:
>
>> I am not able to figure out how to pass a variable in "filename" in
>> "load".
>>
>> Below is what I want to accomplish. Pls help
>> -----------------------------------
>> <html>
>> <head>
>> <script type="text/javascript" src="../Jmol.js"></script>
>> </head>
>> <body>
>>
>> <script type="text/javascript">
>>
>> var val="aspirin.mol";
>>
>> jmolInitialize("../", "JmolAppletSigned.jar");
>> jmolApplet([650, 450], "load @val");
>>
>> </script>
>> </body>
>> </html>
>> ----------------------------------
>>
>>
>> ------------------------------------------------------------------------------
>> 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
>>
>>
>
>
> --
> 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
>
>
> ------------------------------------------------------------------------------
> 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
>
>
------------------------------------------------------------------------------
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