|
Dear Angel, thanks for answering, but your suggestion does not solve
this problem. See below Regards, Romuald Le 26/12/2013 12:59, Angel Herráez a
écrit :
Actually, loading an html file into a div container does work, and it is is still the case when I load external html pages that call jsmol. Every html instruction is well interpreted, with the exception of the pages that contain jsmol controls (buttons or checkboxes).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. As far as I have read on forums, it seems to be possible to load external html files inside div containers. I have seen other possibilities with iframes, but I did not succeed either. I have tested the external pages individually (adding the call to jsmol.min.js, vide infra) and this case everything appears, including the jsmol applet and the control buttons.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. From the secondary one.Important: where do you issue the Jmol commands/links from? From the main page or from the secondary ones? - without the call to jsmol.min.js in the external file : everything works fine with links only, but the checkbox is then the only thing that appears when it is additionally usedwith links (such as <a href="" class="moz-txt-link-rfc2396E" href="_javascript_:Jmol.script(JmolPG,'select*;cartoonsoff;spacefillonly')">"_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? - with a call to jsmol.min.js in the external file : the links appear on the page, but it not the case anymore of the jsmol applet (and of the checkbox, of course) That is the reason why I have tried to define an asynchronous loading, but I am not sure that I really know how to do thatAnyway, 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.
Good try, but unfortunately it is not the reason. This does not
change anything. |
------------------------------------------------------------------------------ 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

