Hi Chuck
I'm returning this to the list thread, for everyone's benefit.
Charles Harrison Shubert wrote:
> I seem to have gotten the behavior I wanted using your suggestion. I
> not longer need Jmol.setXHTML when I use Jmol.getAppletHTML to invoke
> Jmol.
> Instead of using the "document.getElement ..", I used jQuery: $('#' +
> model.ids.id_jsmol).html( Jmol.getAppletHtml(model.ids.id_jsmol +
> "JmolObject", Info);
Yes, that's right. I just thought the HTML version would be more
readable (it is for me), but the equivalent jQuery is OK.
> I then recreated a local jmolObject with:
> jmolObject = eval(model.ids.id_jsmol + "JmolObject");
> to use with
> Jmol.resizeApplet(jmolObject, "100%", "100%");
I learned a few ays ago that you can use this too to refer to the
object, to avoid eval() which seems to raise distrust among
programmers:
jmolObject = window[model.ids.id_jsmol + "JmolObject"];
> I'm still a little confused by some of the jmolObject details as is
> my code, but Jmol is now where I want it in my page and has the
> correct size and z-order (that's in my css).
> I'll spend some time tomorrow cleaning up the code and send you a
> summary.
> Many thanks,
> -Chuck
>
> On Feb 9, 2014, at 4:42 PM, Angel Herráez <[email protected]>
> wrote:
> Hi Chuck
> I've been recently playing with ways to inject the Jmol objecr after
> page is loaded, so I will try to give a hint, see if it works
> Jmol.setXHTML(model.ids.id_jsmol);
> It's not clear to me where you define that ID
> You need an id in your Jmol container div:
> <div> app
> <div> menubar </div>
> <div>
> <div> tabs </div>
> <divid="JmolPlace"> jmol </div>
> </div
> </dib>
>
> Then
> document.getElementById("JmolPlace").innerHTML =
> Jmol.getAppletHtml('myJmol', Info);
> Does that work?
------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users