Angel,

I’m not sure if I fully understand what you are trying to do, but browser local 
storage is a great way to carry on behind the scene communications between all 
types of entities - objects, objects that don’t yet exist, windows, tabs, 
frames, and more. You can even close your browser, open it up again, and 
continue a conversation. It also sends callback messages between windows, tabs, 
and frames.

Otis

--
Otis Rothenberger
o...@chemagic.org
http://chemagic.org

> On Jun 29, 2017, at 11:31 AM, Angel Herráez <angel.herr...@uah.es> wrote:
> 
> 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
> 

------------------------------------------------------------------------------
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

Reply via email to