> I'm looking for some help with what I think is a really basic question.
> I am using the jmol javascript library, for which I am very grateful
> (wow, what a useful thing to have access to! Thanks!) I would like to
> learn how to use the jmolButton method to send a command or script to
> two (or more) jmol applets on the same page, with a single activation
> (click) of the button.

The Jmol.js JavaScript library does not support sending a script to
multiple applets. You need to write your own JavaScript code to do this.

The method that Tim & Bob suggested works fine.

Or, you can use the Jmol.js library to create the applets and call the
function jmolScript() twice with two different targets.

function doTwice(script) {
  jmolScript(script, 0)
  jmolScript(script, 1)
}

Or, you want to provide your own names for the applets, then

jmolApplet({size}, {modelFilename}, {script}, "orville");
jmolApplet({size}, {modelFilename}, {script}, "wilbur");

then

jmolScript(myScript, "orville"); jmolScript(myScript, "wilbur");


Miguel



-------------------------------------------------------
This SF.Net email is sponsored by: thawte's Crypto Challenge Vl
Crack the code and win a Sony DCRHC40 MiniDV Digital Handycam
Camcorder. More prizes in the weekly Lunch Hour Challenge.
Sign up NOW http://ad.doubleclick.net/clk;10740251;10262165;m
_______________________________________________
Jmol-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to