Hello, Romuald
There may be several issues there, but there must be a simple solution.
> and a div container in which
> external html pages are loaded.
Is that an IFRAME? Otherwise, I am not sure how an external page may be
loaded into a div, that could be donde by the jQuery library but it is not
straightforward.
If you do use an iframe, then you can test your pages on their own before
loading them as secondary pages. But there should be no difference.
Important: where do you issue the Jmol commands/links from? From the
main page or from the secondary ones?
> with links (such as <a href="javascript:Jmol.script(JmolPG,'select
> *;cartoons off;spacefill only')">spacefill</a>)
There is a fundamental difference here. Script just sends instructions to
Jmol, while the others create controls in the page. That may be why the first
works for you but not the others.
>, the applet and the rest
> of the external file appear in the div container, as desired.
That's important, meaning your JSmol setup is correct.
I would have expected that you need to call Jsmol.min.js in the secondary
page. I can see you found the contrary, don't know why. Have you tested if
the checkboxes etc work when you add that?
Anyway, the problem may be that the Jmol object is not created --so it
seems-- until the page has finished loading, but the code for the controls is
being run before, so maybe they fail because the Jmol object does not exist
yet.
Oh, well, you have defined JmolPG in advance, so that should not be the
case. Maybe try these changes: give some value to the variable, then use
the variable and not the text string:
var JmolPG = "JmolPG"; // within INITIALIZE JMOL
$("#JmolappPG").html(Jmol.getAppletHtml(JmolPG, InfoPG))
// within $(document).ready(function()
(Not sure about that, but could be the reason)
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users