Dear Angel,
I do apologize for the slow replay.
The original e-mail I sent several weeks ago was what you find below
Dear All
I have a javascript function LoadModels() which should load the models in an
external HTML list ! How can I let the list be populated when I load the page?
This would have to happen just after the jmolApplet(["520","520"] has been
called!
I can make it to work if I do as below
<script type="text/javascript" >
jmolInitialize(".","jmol/JmolAppletSigned0.jar");
jmolApplet(["520","520"], " script
scripts/reset.spt; background white" );
LoadModels();
</script>
my LoadModels() function is meant as :
Thanks, Piero
function LoadModels(selectbox){
var Info = jmolGetPropertyAsArray("auxiliaryInfo.models")
if(!Info){
alert("No models available")
return
}
for(var i=0; i< Info.length; i++)
addOption(document.modelsVib.models, i + " " + Info[i].name, i + 2);
}
function addOption(selectbox,text,value)
{
var optn = document.createElement("OPTION");
optn.text = text;
optn.value = value;
selectbox.options.add(optn);
}
--
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 24, 2010 3:59 PM
To: [email protected]
Subject: Re: [Jmol-users] problem filling an html list
> I don't recall the exact parameters now. See
>
> file:///C:/jmol-dev/workspace/Jmol-
> documentation/script_documentation/index.htm?ver=11.10&search=callback
> #setcallback
There's also a bit of info that may be helpful about how to deal with
callbacks at
http://jmol.sourceforge.net/jslibrary/#jmolSetCallback
------------------------------------------------------------------------------
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