Thanks, Bob > Well, if you wrote the page, you should know, right? ;)
Not necessarily ;-) I mean, applets are generated quasi-automated by some back-end code. > All applets are registered in Jmol._applets. Could be. The problem is to know which of those is involved at a certain instance. All this is for automatic, generalized code being run behind the curtains in Proteopedia. We are after ways for a "scene" (that links to a state script) to do something in the page area related to that JSmol object. So I thought that the safest way would be to call this from within JSmol, instead of from the page, since the same "scene" link may be applied to different JSmols. I have managed a solution using an echoCallback. Not too clean, but seems to do the trick. Page JavaSscript has this: function readTheApplet() { window['calledAppletID'] = arguments[0].replace(/jmolapplet/i,''); } and the Jmol script has this: set EchoCallback "readTheApplet"; set echo dum 0 0; echo "."; set EchoCallback none; echo; The global Javascript variable "calledAppletID" in the page then will hold the ID. ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Jmol-users mailing list Jmol-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-users