will be, for instance, jmolAppelt0

On Sun, Oct 6, 2013 at 11:18 AM, Angel HerrŠez <> wrote:
I cannot find documentation on the callbacks in JSmol

My problem is how to apply a script in the callback function
I have

Info = {
† loadstructcallback: 'modelLoaded';

function modelLoaded(a,b,c) {
† Jmol.script( myJmol, myScript );

The question is how to provide myJmol object reference for the script. As far
as I can see, the first parameter returned from the callback is a text string in
the way †myJmol_object
But I need the Jmol object itself, not a text string.

I found that this works, but I'd rather not use an internal objectref.:
Jmol.script( Jmol._applets[a.split("_object")[0]], myScript )

I think there must be a user-friendly way of referring to the †Jmol Object
returned from the callback. Old jmolCallback() returned a text string (the
applet id) but that could be used directly, since the applet id is what the
Jmol.js functions expected.

So what's the way?

October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
Jmol-users mailing list

Robert M. Hanson
Larson-Anderson Professor of Chemistry
St. Olaf College
Northfield, MN

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