I got your script I was trying to use it
my HTML page has the script set like that <script type='text/javascript'> var Colorscript = new Array (setAtomColor); jmolColorPickerBox(Colorscript, 'rgb(100,100,100)')"; </script> The array Colorscript should be the array which include the name of the function to call the function setAtomColor() is written as : var atomColor = ""; function elementSelected(element){ setValue("select none; halo off; label off"); setValue("select " + element + "; halo on; label on"); atomColor = "' color " + element; return atomColor; } function setAtomColor (rgbCodeStr, Colorscript , jmolApplet0, atomColor){ var finalColor = " " + atomColor + " " + rgbCodeStr + " "; return finalColor; } I think I got your explanation wrong in the headings of your script. Is the rgbCodeStr the color selected by jmolColorPickerBox ? Thanks a lot, 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 ----------------------------------------------------------- ________________________________________ From: Jonathan Gutow [gu...@uwosh.edu] Sent: Tuesday, July 20, 2010 2:51 AM To: jmol-users@lists.sourceforge.net Subject: Re: [Jmol-users] New version of jmolColorPickerBox that may solve Piero's problem Thanks hadn't caught that. Will fix. Jonathan On Jul 19, 2010, at 1:36 PM, jmol-users-requ...@lists.sourceforge.net<mailto:jmol-users-requ...@lists.sourceforge.net> wrote: Subject: Re: [Jmol-users] New version of jmolColorPickerBox that may solve Piero's problem To: <jmol-users@lists.sourceforge.net<mailto:jmol-users@lists.sourceforge.net>> Message-ID: <4c448b67.11233.37dd2...@angel.herraez.uah.es<mailto:4c448b67.11233.37dd2...@angel.herraez.uah.es>> Content-Type: text/plain; charset="US-ASCII" Jonathan, there is an error in the instructions on that web page http://www.uwosh.edu/faculty_staff/gutow/Jmol_Web_Page_Maker/JmolColorPicker/Jmol%2 0Color%20Picker%20Test.html it says Usage Where ever you want a popup color picker box include a script like <script type="text/javascript"> var scriptStr2 = 'select carbon; color atom $COLOR$;'; jmolColorPickerBox(scriptStr2, "rgb(100,100,100)", "colorBox1", "0"); </script> But the correct syntax for the second argument is [100,100,100] Dr. Jonathan H. Gutow Chemistry Department gu...@uwosh.edu<mailto:gu...@uwosh.edu> UW-Oshkosh Office: 920-424-1326 800 Algoma Boulevard FAX:920-424-2042 Oshkosh, WI 54901 http://www.uwosh.edu/facstaff/gutow ------------------------------------------------------------------------------ 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