Hi Angel

Thanks for your prompt response. However,

Info.makeLiveImg = "path/to/icon.png"

didn't work, on its own. JSmol does not understand the makeLiveImg
parameter of the Info variable 'out of the box', at least in the version
(14.4.1_2016.01.09) I am using. Tried a 'global' search of the code
for makeLiveImg with Reggexer, without luck. So, you may have to change the
Wikki again :-(

That said, your hint about the Export to Web script put me 'back on track'.
This uses some additional jQuery 'magic' to overwrite the new path for the
icon.

So, something like the following works nicely for JSmol written to a div
with id="structure":

$("#structure").html(Jmol.getAppletHtml("jmolApplet0", Info));
$("#jmolApplet0_coverclickgo").attr("src", "path/to/icon");

Or using a 'custom' Info variable parameter (similar to the Export to Web
script)

var Info = {
    ...
    makeLiveImg: "path/to/icon",
    ...
}

$("#structure").html(Jmol.getAppletHtml("jmolApplet0", Info));
$("#jmolApplet0_coverclickgo").attr("src", Info.makeLiveImg);

Note that I tend to have each JSmol object in its own iframe. So, they all
can be "jmolApplet0".

Cheers

Geoff
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to