Wow!  Thanks, guys!  I've been a lurker on this list for quite a while and have picked up a lot of interesting technique for using Jmol from you.

Angel's response is very helpful for my particular issue.  The point is that I must treat the Info variable in my javascript as belonging to the Jmol Object.  My code was operating under the assumption that it was not.  I'll fix that.

Here's a follow on question:  Assuming that I've created a Jmol Object using an Info variable, what happens when I change (say) Info.script instead of calling the script() function?

Many thanks,

--Chuck

On Jan 28, 2014, at 7:13 PM, Otis Rothenberger <osrothen@chemagic.com>
 wrote:

Chuck,

I'm sorry. I misunderstood. I thought you were trying to write Info variable data to Jmol.setInfo.

Otis

On Jan 28, 2014, at 12:54 PM, Otis Rothenberger <osrothen@chemagic.com> wrote:

Chuck and Angle,

I think I'm in basic agreement with Angle. I look at this as a scratch pad per the following JS function:

function scratchPad(header, content) {
header = (!header) ? "" : header;
content = (!content) ? "" : content;
if (header == "" && content == "") { Jmol.setInfo(jmolApplet0, content, false); return null; }
jmolApplet0._infoHeader = header;
Jmol.setInfo(jmolApplet0, content, true);
return null;
}

I write to it as needed using the above - e.g. display pdb header or pdb content. Storage of a given content/header pair would have to be in some type of global variable. Long term storage would have to be server side, although for small bits of information I've used cookies.

Only because I found out the hard way, 10 cholesterol molfile cookies will break the cookie jar. I did not realize what a pain a broken cookie jar could be for the user!

Otis

--
Otis Rothenberger
otis@chemagic.com
http://chemagic.com




On Jan 28, 2014, at 12:16 PM, Angel HerrŠez <angel.herraez@uah.es> wrote:

Hi, Chuck

this is how I see it (but I may not be right)

There is not "your" variable and "Jmol's" variable. The single Info
variable belongs to the Jmol Object once you invoke getApplet.

What you do is initialize some values/parameters that are part of the
Info variable (which is more properly a Javascript object with many
name/value pairs). Jmol has defaults for all of them and will change
just the ones you state.
So I am not suprised at all that Jmol "writes" in the Info variable.

In summary
1. a single Info variable
2. has defaults for all its properties or parts or parameters
3. the defaults are overwritten by your data
4. Jmol will be using all the time the single Info variable


Ah, of course if you have two Jmols they may use separate Infos,
that's why you need to assign Info in the Jmol.getApplet() call.


------------------------------------------------------------------------------
WatchGuard Dimension instantly turns raw network data into actionable
security intelligence. It gives you real-time visual feedback on key
security issues and trends.  Skip the complicated setup - simply import
a virtual appliance and go from zero to informed in seconds.
http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users




------------------------------------------------------------------------------
WatchGuard Dimension instantly turns raw network data into actionable
security intelligence. It gives you real-time visual feedback on key
security issues and trends.  Skip the complicated setup - simply import
a virtual appliance and go from zero to informed in seconds.
http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users

------------------------------------------------------------------------------
WatchGuard Dimension instantly turns raw network data into actionable
security intelligence. It gives you real-time visual feedback on key
security issues and trends.  Skip the complicated setup - simply import
a virtual appliance and go from zero to informed in seconds.
http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users