Hi Thomas
There may be no need for any changes in the other server; please try my
code at the bottom. You MUST define the location of jsmol.php
That cod works for me in localhost, but nt when I upload to my server. That
may be related to Bob's comments about AJAX calls, I don't know about that.
And as Bob said, the url to the pdb file must be fixed.
--------------------------
<!DOCTYPE HTML>
<html>
<head>
<script src="../../JSmol/JSmol.min.js" type="text/javascript">/*ADJUST TO
YOUR PATH*/</script>
<script type="text/javascript">
window.onload = function() {
$(".interactionButtonStructure").click(function(){
// WRONG URL: var command = "load
http://cancer3d.org/structuresChains/3DQWA.pdb; display *:A/1.1;";
var command = "load
http://192.231.106.97/structuresChains/3DQWA.pdb; display *:A/1.1;";
Jmol.script(jsmolApplet0,command);
});
}
var jsmolPath = '../../JSmol/'; /*ADJUST TO YOUR PATH*/
var Info = {
j2sPath: jsmolPath + "j2s",
serverURL: jsmolPath + "php/jsmol.php", //THIS LINE IS ESSENTIAL FOR
CROSS-SITE FILE LOADING
src: '$caffeine'
};
</script>
</head>
<body>
<p>text</p>
<script type="text/javascript">
Jmol.getApplet('jsmolApplet0', Info);
</script>
<p>
<input type="button" value="load molecule"
class="interactionButtonStructure">
</p>
</body>
</html>
--------------------------
------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users