Ah, ok, read that again, Bob.....
Remember we are using jQuery, so we have very powerful tools to access
these menu items. Let's see.... The value attribute is an index into the
Jmol.controls._scripts array. So just change the second parameter of that
array, and you have changed the script action of that menu item.
On Fri, Dec 19, 2014 at 12:31 PM, <[email protected]> wrote:
> Dear all,
>
>
>
> I’m using the jmolMenu function to insert a dropdown menu on a page (and
> setting the id of the select element to myselect), but after the page has
> loaded, I’d like to be able to change the jmol command that is associated
> with one of the selects. I’ve tried setting things like val() of the
> correct select option with
>
>
>
> $("#myselect :nth-child(1)").val("select model=1.1; color atoms white;");
>
>
>
> but this doesn’t work (and in fact by looking at the browser console val()
> just contains an integer value). Is what I’m trying to achieve possible at
> all?
>
>
>
> Cheers,
>
> Chris
>
>
>
> -------------------
>
> Dr Chris Wood
>
> STFC Rutherford Appleton Laboratory
>
> Didcot
>
> OX11 0QX
>
>
>
> [email protected]
> www.ccpem.ac.uk
>
>
> Tel: +44(0)1235 567864
>
> Tel: +44(0)7909 586624
> Fax: +44(0)1235 567801
>
>
>
> Skype: chris_c_wood
>
>
>
>
>
>
> ------------------------------------------------------------------------------
> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
> with Interactivity, Sharing, Native Excel Exports, App Integration & more
> Get technology previously reserved for billion-dollar corporations, FREE
>
> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
> _______________________________________________
> Jmol-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jmol-users
>
>
--
Robert M. Hanson
Larson-Anderson Professor of Chemistry
Chair, Department of Chemistry
St. Olaf College
Northfield, MN
http://www.stolaf.edu/people/hansonr
If nature does not answer first what we want,
it is better to take what answer we get.
-- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users