You just do this:

Jmol.getApplet("yourNameHere", Info)


If you need to create controls prior to the applet being on the page, then
use quotes around the file name, not the name itself:

Jmol.jmolButton("yourNameHere", "background red", "testing")

rather than

Jmol.jmolButton(yourNameHere, "background red", "testing")

Either will be OK, but that second one will work only after the
Jmol.getApplet() method has run on the page. The original idea of saying

yourNameHere = "yourNameHere"

up front makes them both work anytime. And this is nice because some
commands that interact with the applet immediately, such as

Jmol.script(yourNameHere,"background red")

MUST be the actual applet object. So, I don't know, maybe the best advice
is to use

yourNameHere = "yourNameHere"

in the header and then always refer to the applet name without the quotes.
That's probably the simplest to remember.

Bob





On Sat, Jun 29, 2013 at 1:33 PM, Otis Rothenberger <[email protected]>wrote:

> I'm having an erratic display issue with multiple applets. I remember
> Angel mentioning something about declarations of the following type not
> being required any longer with JSmol:
>
> var jmolApplet0;
> var jmolApplet1;
> var jmolApplet2;
>
> What's the current best practice with this declaration approach?
> Currently, I'm still using them. Also, are the integers in the applet names
> meaningful in any way? Would any type of erratic display error occur if you
> named three applets moe, larry, and curly? This may sound like a dumb
> question, but I think I may be seeing a random problem with the following:
>
> var jmolApplet50;
> var jmolApplet51;
> var jmolApplet54;
>
> The above numbering was a mistake, but with this numbering, a few students
> are reporting that 54 is not rendering.
>
> Otis
>
> --
> Otis Rothenberger
> [email protected]
> http://chemagic.com
>
>
>
>
>
>
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Windows:
>
> Build for Windows Store.
>
> http://p.sf.net/sfu/windows-dev2dev
> _______________________________________________
> Jmol-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jmol-users
>



-- 
Robert M. Hanson
Larson-Anderson Professor of Chemistry
St. Olaf College
Northfield, MN
http://www.stolaf.edu/people/hansonr


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
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to