You can only load binary files from your local machine if you are using
FireFox, I believe. And maybe just on a PC. I can't remember. Any chance
that is your problem?
What is happening is that your machine does not support asynchronous binary
file transfer using AJAX, so it has to go to a server and get the server to
convert that GZIP file to BASE64, transfer it, convert it back to GZIP,
then decode that. But it can't go to the server with a local call - or at
least that could never work (because it is a local file) and you get that
error message. So even if you had the right server call, this would not
work locally.
I need to get the newer Jmol2.js out there -- It should read:
Jmol.Info = {
// jarPath: "java",
// jarFile: "jmolAppletSigned.jar",
// signed: true,
// j2sPath: "j2s",
use: "HTML5", // could be JAVA or HTML5
serverURL: "http://wine-and-crackers.local/chem/reuse/php/jsmol.php",
disableJ2SLoadMonitor: false,
disableInitialConsole: true
}
Those lines need uncommenting only if your page doesn't call
jmolInitialize() or you want to override that call.
On Thu, Jan 16, 2014 at 2:23 PM, Christopher Masi <cm...@westfield.ma.edu>wrote:
> 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 <angel.herr...@uah.es> 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
> Jmol-users@lists.sourceforge.net
> 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
>
>
>
> ------------------------------------------------------------------------------
> 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
> Jmol-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jmol-users
>
>
--
Robert M. Hanson
Larson-Anderson Professor of Chemistry
St. Olaf College
Northfield, MN
http://www.stolaf.edu/people/hansonr
If nature does not answer first what we want,
it is better to take what answer we get.
-- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900
------------------------------------------------------------------------------
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
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users