Dear all, 

do you know why  JmolColorPickerBox( doesn't work ? The string  scriptColor = 
"' color " + element + " $COLOR$'"; s  correctly written. 



var scriptColor =  ""; 
  function elementSelected(element){

   scriptColor = "' color " + element + " $COLOR$'";    
   return scriptColor;
  }



this function createAppearanceGr  generate the html wchi will show   on the 
main page
The function createList2("colourbyElementList", "elementSelected(value)", "", 
1);  creates this kind of select which contains the element list out after 
loading the jmol structure and looks like: 
<select name="colourbyElementList" id="colourbyElementList" size="1" class="" 
onchange="elementSelected(value)"><option value="iron">iron</option><option 
value="oxygen">oxygen</option></select>


  //

  ///////////////////////////// create Appearance Grp
https://owa.connect.kent.ac.uk/OWA/?ae=Item&t=IPM.Note&a=New#
  function createAppearanceGrp(){

    var strApp="<form id='appearanceGroup' name='appearanceGroup' 
style='display:none'>";

    strApp+="Appearance<BR>\n"; 

    strApp+="Colour Atom\n";

    strApp+="<BR>Select by: \n";

    strApp+=createRadio("colourby","element","",0, 1,"")+ "\n";

    strApp+="&nbsp" + createList2("colourbyElementList", 
"elementSelected(value)", "", 1) + "\n";

    strApp+=createRadio("colourby","atom",'',0, 1,"")+ "\n";

    strApp+="&nbsp" + createList2('colourbyAtomList', '', 'disab', 1) + "\n";

    strApp+=createRadio("colourby","selection",'',0, 1,"")+ "\n";
    strApp+="<BR>\n";

    strApp+="<table><tr><td>Colour</td><td><script type='text/javascript'>\n";

    strApp+=x(" + scriptColor + ",[255,255,255]); \n";
    strApp+="</script></td></tr></table> \n";

    strApp+="</form>\n";

    return strApp;

  }

  //


Thanks, Piero 

-- 
Please consider the environment before printing this e-mail.

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

e-mail: pc...@kent.ac.uk
mobile: +44 (0) 7772-9756456
-----------------------------------------------------------
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to