On an online textbook, we have some applets where clicking an atom opens the model in the virtual model kit editor via a pop-up. We identify these applets by using a number 50 or higher in the applet name - e.g. jmolApplet51. The callback function that pops the model into a popup editor parses the object name (string) to decide pop or no pop.

I'm sure we can do this by extracting the string from the object. I'm just suggesting that object vs string may be a coin flip as far as utility is concerned. I'm good either way. With a string some kind of a getObject function will be required. With the object, some type of getString function will be required.


Otis Rothenberger

On Oct 6, 2013, at 3:01 PM, Angel HerrŠez wrote:


I don't know that syntax. Will try.
Is it cross-browser?

Or are you saying that you would like to see the object itself as the callback

Well, yes, That was my hope. All current JSmol functions like Jmol.script()
take the object as first argument. So I was hoping to be able to use the
object itself.

If so, I'd say that having easy access to the object name from the callback
has some utility - e.g. excluding certain applets from the callback action.

Mabe. But the problem is how to get the object from the name. The other
way round, ie getting the name from the object, is probably straightforward --I
don't know.
And what is the use for the name anyway?  Excluding certain applets...
wouldn't that be done with the object rather than the name?

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