Hi everyone, I want to start a jsmol view on a click. I have a thumbnail placeholder for the view inside of a div.
Here’s my code. <img src="./images/wait.gif" id="thumbnailView"/> <div id="structureView"> <script type="text/javascript" id='jsmolScript'> // ViewInfo.width = 150; // ViewInfo.height = 150; // ViewInfo.script = "load http://"+window.location.hostname+"/structuresChains/<?php echo $potmPDBID.$potmChainID?>.pdb; display *;select *; cartoon; color [128,128,128]; select not protein and not hetero; select *; wireframe off; spacefill off;center *:A;background [255,255,255];"; // ViewInfo.readyFunction = jmol_isReady; // jsmolApplet0 = Jmol.getApplet("jmolApplet0", ViewInfo); </script> </div> If I only run the above (now commented) code the viewer opens in the structureView div. $("#thumbnailView").click(function(){ ViewInfo.width = 150; ViewInfo.heigth = 150; ViewInfo.script = "load http://"+window.location.hostname+"/structuresChains/<?php echo $potmPDBID.$potmChainID?>.pdb; display *;select *; cartoon; color [128,128,128]; select not protein and not hetero; select *; wireframe off; spacefill off;center *:A;background [255,255,255];"; ViewInfo.readyFunction = jmol_isReady; jsmolApplet0 = Jmol.getApplet("jmolApplet0", ViewInfo); }); When I click the image and process the code above the full page closes and the view appears all by itself. How can I bind opening the jsmo view to a div? What am I missing? Here’s my full example: http://www.cancer3d.org/dev/indexClickTest.html Thank you in advance for your help, Thomas ------------------------------------------------------------------------------ Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk _______________________________________________ Jmol-users mailing list Jmol-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-users