Dear all,
In the page I am working on  I create a button to load new files as below:
<input TYPE="button" NAME="load_structure" class='button' value="Load file *.out/*out.gz
       OnClick='jmolScript("load ?; script scripts/name.spt;  background white") + removeAllModels() + loadModels()'>
function loadModels() is expected to load on an external list all the models  called within the first JmolScript(load ? .... ).  loadModels() just reads models from the previous structure and not from the  latest.
Do you know how to solve his problem? Does exist a way to let the javascript be executed sequentially as they are written? for instance  jmolScript("load ?; script scripts/name.spt;  background white") + removeAllModels() + loadModels() . Stick to the sequence ....
Thanks a lot, Piero
Function loadModels() is
function loadModels(selectbox){
            var Info = jmolGetPropertyAsArray("auxiliaryInfo.models")
             alert("No models available")
     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;
thanks, Piero
Pieremanuele Canepa
Room 104
Functional Material Group
School of Physical Sciences, Ingram Building,
University of Kent, Canterbury, Kent,
United Kingdom

mobile: +44 (0) 7772-9756456