Frieda, you need to sync the applets using the syncScript option. Simplest
way is to interact only with one applet ,and then use:

jmolScript('sync . ON;sync > SLAVE;set syncScript on ')


This turns sync ON for the applet being sent the code, makes the other
applet a follower only, and sets the script syncing on so that when you send
a script to one applet, it sends the script to the other.

If you do not want the applets left in this condition (because, for example,
you don't want the user's commands from using the menu operating in the
OTHER applet as well), then send you script like this:


jmolScript('sync . ON;sync > SLAVE;set syncScript on;' + myScriptToSent +
";sync * off")

which then turns sync off immediately after sending the desired command.

Bob


On Wed, Mar 31, 2010 at 8:01 PM, Frieda Reichsman <frieda...@mac.com> wrote:

> Hi Angel,
>
> Thanks - I do want to affect both applets with a single jmolScript
> call, but I cannot seem to get "all" to work. I am using Jmol 11.8.22.
>
> So, for example, this sends the script to the second applet on the page:
> <input type='radio' name='antialias' id='antialiasOn'
> onclick='jmolScript(\"quit; antialiasdisplay = true\", 1);
>
> But this sends the script only to the first applet and not to both:
> <input type='radio' name='antialias' id='antialiasOn'
> onclick='jmolScript(\"quit; antialiasdisplay = true\", all);
>
> Frieda
>
>
>
>
> On Mar 31, 2010, at 3:52 AM, Angel Herráez wrote:
>
> > Hi Frieda
> >
> > I don't think you can do it for any two applets in one go. Either
> > one or all.
> > I'm assuming you use Jmol.js.
> >
> > jmolScript() takes as its 2nd argument the ID, which may be "all".
> >
> > For buttons, you need to use jmolSetTarget() which I'm not sure if
> > it accepts the special "all",
> > but give it a try.
> >
> >
> >
> ------------------------------------------------------------------------------
> > Download Intel&#174; Parallel Studio Eval
> > Try the new software tools for yourself. Speed compiling, find bugs
> > proactively, and fine-tune applications for parallel performance.
> > See why Intel Parallel Studio got high marks during beta.
> > http://p.sf.net/sfu/intel-sw-dev
> > _______________________________________________
> > Jmol-users mailing list
> > Jmol-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/jmol-users
>
>
>
> ------------------------------------------------------------------------------
> Download Intel&#174; Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> Jmol-users mailing list
> Jmol-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jmol-users
>



-- 
Robert M. Hanson
Professor of Chemistry
St. Olaf College
1520 St. Olaf Ave.
Northfield, MN 55057
http://www.stolaf.edu/people/hansonr
phone: 507-786-3107


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 Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to