It has to be like that, with spaces such as ' '  ,   otherwise I would have not 
worked ! 

function setPackaging(){
                                  jmolScript('load "" {' + 
document.pack.par_a.value + ' ' +
                                document.pack.par_b.value + ' ' +
                                document.pack.par_c.value
                                + '}')
            }

Thanks 
--
Pieremanuele Canepa
Room 104
Functional Material Group
School of Physical Sciences, Ingram Building,
University of Kent, Canterbury, Kent,
CT2 7NH
United Kingdom

e-mail: [email protected]
mobile: +44 (0) 7772-9756456
-----------------------------------------------------------
________________________________________
From: Angel Herráez [[email protected]]
Sent: Wednesday, March 17, 2010 4:55 PM
To: [email protected]
Subject: Re: [Jmol-users] load file

Piero, you must be careful with the quotes. Javascript gets confused

Try this way, combining double quotes (for Jmol) and single quotes
(for JS):

function setPackaging(){
    jmolScript('load "" {' + parseInt(document.pack.par_a.value)  +
parseInt(document.pack.par_b.value) +
parseInt(document.pack.par_a.value)
+ '}')
                           }

There was also a missing space between load and the quotes.
You can probably skip the parseInt functions, since you are doing
string concatenation anyway and the fields return strings.

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to