Daniel,

I mean like this:

var myJmol;

myJmol = Jmol.getApplet("myJmol", Info);





Actually, I use (with jmolApplet0) the following:

var jmolApplet0 = "jmolApplet0";

jmolApplet0 = Jmol.getApplet("jmolApplet0", Info);

But I think the declaration without assigning a value should work.

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




On Jun 14, 2013, at 4:06 PM, Daniel Barich wrote:

> Sorry for the blank message.  I'm using the var keyword now and the buttons 
> still don't work.  I tested using the Control + Shift + J console in Chrome, 
> and myJmol is created as a Canvas2D object.
> 
> 
> On Fri, Jun 14, 2013 at 4:01 PM, Daniel Barich <bari...@kenyon.edu> wrote:
> 
> 
> 
> On Fri, Jun 14, 2013 at 3:33 PM, Otis Rothenberger <osrot...@chemagic.com> 
> wrote:
> Daniel,
> 
> Try a global declaration of myJmol - i.e.
> 
> var myJmol;
> 
> Otis
> 
> 
> --
> Otis Rothenberger
> o...@chemagic.com
> http://chemagic.com
> 
> 
> 
> 
> On Jun 14, 2013, at 3:24 PM, Daniel Barich wrote:
> 
>> I added a DOCTYPE and an html tag at the top, but the buttons still don't 
>> work.
>> 
>> 
>> On Fri, Jun 14, 2013 at 3:02 PM, Otis Rothenberger <osrot...@chemagic.com> 
>> wrote:
>> Hi Angel and Daniel,
>> 
>> I can't see any JavaScript errors either, but as I play with it in my 
>> error/code console, I see myJmol as being undefined. Something's messing up 
>> myJmol as a global window property even though the applet is loading.
>> 
>> I do not see an initial html tag. JavaScript global variables are really 
>> window properties. Is it possible that myJmol is being lost as a global 
>> JavaScript property of the window because of this apparent omission?
>> 
>> By way of example:
>> 
>> Jmol.script(myJmol,"select all;color red")
>> 
>> does not work at all.
>> 
>> Otis
>> 
>> --
>> Otis Rothenberger
>> o...@chemagic.com
>> http://chemagic.com
>> 
>> 
>> 
>> 
>> On Jun 14, 2013, at 1:31 PM, Angel Herráez wrote:
>> 
>> > Hi Daniel
>> >
>> > I am not seeing javascript errors. The buttons d not work, but their
>> > syntax is wrong. You have
>> >
>> > Jmol.jmolButton("select all; wireframe on; etc
>> > and you need
>> >
>> > Jmol.jmolButton(myJmol, "select all; wireframe on; etc
>> >
>> >
>> >
>> >
>> > ------------------------------------------------------------------------------
>> > This SF.net email is sponsored by Windows:
>> >
>> > Build for Windows Store.
>> >
>> > http://p.sf.net/sfu/windows-dev2dev
>> > _______________________________________________
>> > Jmol-users mailing list
>> > Jmol-users@lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/jmol-users
>> 
>> 
>> 
>> 
>> ------------------------------------------------------------------------------
>> This SF.net email is sponsored by Windows:
>> 
>> Build for Windows Store.
>> 
>> http://p.sf.net/sfu/windows-dev2dev
>> _______________________________________________
>> Jmol-users mailing list
>> Jmol-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/jmol-users
>> 
>> ------------------------------------------------------------------------------
>> This SF.net email is sponsored by Windows:
>> 
>> Build for Windows Store.
>> 
>> http://p.sf.net/sfu/windows-dev2dev_______________________________________________
>> Jmol-users mailing list
>> Jmol-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/jmol-users
> 
> 
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Windows:
> 
> Build for Windows Store.
> 
> http://p.sf.net/sfu/windows-dev2dev
> _______________________________________________
> Jmol-users mailing list
> Jmol-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jmol-users
> 
> 
> 
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Windows:
> 
> Build for Windows Store.
> 
> http://p.sf.net/sfu/windows-dev2dev_______________________________________________
> Jmol-users mailing list
> Jmol-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jmol-users

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

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

Reply via email to