From: Robert H. <ha...@st...> - 2014-01-27 23:00:15
|
Jmol.getAppletHtml("jmolApplet0", Info) is fine. It is defined as: // optional Info here Jmol.getAppletHtml = function(applet, Info) { if (Info) { var d = Jmol._document; Jmol._document = null; applet = Jmol.getApplet(applet, Info); Jmol._document = d; } return applet._code; } and thus is equivalent to: var x = Jmol._document Jmol.setDocument(0); Jmol.getApplet("jmolApplet0", Info) Jmol.getAppletHtml(jmolApplet0, Info)); Jmol._document = x Basically, the fact that you have Info there implies you are defining the applet. Thus this useful shortcut. Bob On Mon, Jan 27, 2014 at 5:39 AM, Angel Herráez <ang...@ua...> wrote: > Hi, Carlo (?) > > I cannot help much with jQuery, but you should not be using that syntax > > jmolButton('spin on','spin it!'); > > but instead > Jmol.jmolButton(jmolApplet0, 'spin on','spin it!'); > > (The first one may work if you are using Jmol2.js, but since you have these > errors I think it's better to go for the purest syntax) > > Also, you should call the Jmol object as an object, not by its name: > > Jmol.setDocument(0); > Jmol.getApplet("jmolApplet0", Info) > Jmol.getAppletHtml(jmolApplet0, Info)); > > > Hope it helps, > Ciao > > > > > ------------------------------------------------------------------------------ > CenturyLink Cloud: The Leader in Enterprise Cloud Services. > Learn Why More Businesses Are Choosing CenturyLink Cloud For > Critical Workloads, Development Environments & Everything In Between. > Get a Quote or Start a Free Trial Today. > > http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk > _______________________________________________ > Jmol-users mailing list > Jmo...@li... > 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 |