From: Christopher M. <cm...@we...> - 2014-01-16 19:23:34
|
Angel, Yes, I think I’m calling the JSmol.min.js file first. In the header of the html page, I’ve got this <script type="text/javascript" src="../../reuse/JSmol.min.js"></script> <script type="text/javascript" src="../../reuse/Jmol.js"></script> <!--location of renamed Jmol2.js library--> <script type="text/javascript"> var Info = { j2sPath: "../../reuse/j2s", use: "HTML5" }; Jmol._alertNoBinary = false; </script> If I put the Jmol.js call first, not surprisingly, nothing works (the application doesn’t load). In the body of the page I’ve got <script type="text/javascript"> jmolHtml('<center>'); jmolInitialize("../../reuse"); //required jmolApplet(400, 'load o_atom_2s.cub.gz; spacefill .01; bgcolor="255,255,255";','o_atom'); jmolHtml('<br>'); […] </script> When the serverURL is put between lines 38 and 47 of the jmol2.js file like this Jmol.Info = { jarPath: "java", jarFile: "", j2sPath: "j2s", use: "HTML5", // could be JAVA or HTML5 serverURL: "http://wine-and-crackers.local/chem/reuse/php/jsmol.php", disableJ2SLoadMonitor: false, disableInitialConsole: true } I get an error in a dialog box that says "Error connecting to server: http://your.server.here/jsmol.php?call=getRawDataFromDatabase&database=_&query=http%3A%2F%2Fwine-and-crackers.local%2Fchem%2Forganic%2Fmo_plain%2Fo_atom_2s.cub.gz&encoding=base64” The JSmol window shows an error that says “unrecognized file format for file […]cub.gz” and the error console says "[Error] Failed to load resource: A server with the specified hostname could not be found.” (There’s more if you want the whole list.) Maybe I’ve screwed something up… I was trying to go the minimal effort route, and since I call jmolInitialize from my Jmol scripts I tried to follow these directions here (http://wiki.jmol.org/index.php/Jmol_JavaScript_Object#JSmol for using the Jmol2.js method). Previously, everything was stored in a directory I call “reuse” so I don’t have to have multiple copies of the things I want to use on multiple pages. The directory "/chem/reuse" contains renamed Jmol2.js file jsmol.min.js file j2s directory php directory which contains the jsmol.php file As long as it works when I include the “serverURL:” in each of the html file that I create (and it does work) I’m ok with that. Thanks, Chris On Jan 16, 2014, at 12:33 PM, Angel Herráez <ang...@ua...> wrote: > Chris, are you calling Jmol2.js before or after JSmol.min.js? > That could be a reason for parameters not being applied. > > JSmol.min.js includes some defaults. > > I think you need Jmol2.js after it. > > > > > ------------------------------------------------------------------------------ > CenturyLink Cloud: The Leader in Enterprise Cloud Services. > Learn Why More Businesses Are Choosing CenturyLink Cloud For > Critical Workloads, Development Environments & Everything In Between. > Get a Quote or Start a Free Trial Today. > http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk > _______________________________________________ > Jmol-users mailing list > Jmo...@li... > https://lists.sourceforge.net/lists/listinfo/jmol-users -- Learn about brittle bone disease... http://www.oif.org -- Learn about Brittle Bone Disease http://www.oif.org -- Christopher J. Masi, Ph.D. Associate Professor of Chemistry Westfield State University 577 Western Ave Westfield, Massachusetts 01086 (413)572-5371 |