Dear Bob,
Can you please give me an example on how to call a javascript function after 
the Jmol.script() is done?
Thank you in advance,
Jaim

On Jan 13, 2014, at 1:55 PM, Robert Hanson 
<hans...@stolaf.edu<mailto:hans...@stolaf.edu>> wrote:

It's not that the alert is coming first; it's that there is no REFRESH before 
the alert. If you had that command prior to the  javascript command, then the 
structure will appear before the alert.

I would argue that this is proper behavior. There is no particular reason to 
demand an automatic refresh prior to a javascript command, and the behavior is 
the same for both Java and HTML5 modes.

Bob




On Mon, Jan 13, 2014 at 5:12 AM, Jaime Prilusky 
<jaime.prilu...@weizmann.ac.il<mailto:jaime.prilu...@weizmann.ac.il>> wrote:
We used to have a call to javascript as part of the script text, but that is 
not longer working:

Jmol.script(jmol0,'load data/123.pdb; javascript alert(“Back”);’);

On the following example, the alert() happens before the script gets executed. 
The threading mechanism plays here against us.

Jmol.script(jmol0,'load data/123.pdb; select all; color blue;');
alert(“Back”);

Suggestions? The set (callback) mechanism doesn’t seem to be the right choice.

Jaim
------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net<mailto:Jmol-users@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/jmol-users



--
Robert M. Hanson
Larson-Anderson Professor 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

------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users

------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to