It appears that Angel’s supposition is correct; that, is using 
                var Info = {
                        blah: “blah"
                        };
in the header of the html file to set any value means that none of the values 
for things like “j2sPath”, “serverURL”, etc. in the Jmol2.js file will be used. 
Thus, if one uses that method for setting values, then all the values need to 
be set that way. On the other hand, it also appears that if one uses Angel’s 
suggesting of setting the values by using syntax like this  "Jmol.Info.j2sPath 
= “path-to-j2s/j2s”;” in the html file  then the values that are specified 
override any values set in Jmol2.js and all other values in Jmol2.js that 
haven’t been overridden by a similar statement in the html file are still used. 
Thus, it’s may be a good idea to set the path to the j2s directory in the html 
file using the "Jmol.info.j2sPath” syntax since not all html files will be in 
the same location and set every other value in the Jmol2.js file.

I reached this conclusion based on the following observations.This is for Mac 
versions of Firefox and Safari with files being served via the loopback address 
to a server on the same Mac as configured by Apple’s server app when loading 
gzipped files.

Works for Firefox and Safari: Do not specify any values for “Info" in html file 
and specify "j2sPath", "serverURL", and "use" in jmol2.js.
Works for Firefox and NOT Safari:  Specify either “use” or “j2sPath" value 
using “var Info = { [etc/]” in the html file and specify “serverURL” in jmol2js.
Works for Firefox and Safari: Specify “j2sPath” value using "Jmol.Info.j2sPath 
= “path-to-j2s/j2s”;” (see script below) in the header of the html file and 
specify the “serverURL” in the Jmol2.js file
        <script type="text/javascript">
                Jmol.Info.j2sPath = “path-to-j2s/j2s";
        </script>
Works for FireFox and Safari: Specify everything in the html file using “var 
Info ={ [etc]”. 

On Jan 16, 2014, at 9:24 PM, Robert Hanson <hans...@stolaf.edu> wrote:

> 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? 

I’m not loading the files using the local file system; that is, using 
file:///path-to-file.html.
I’m serving them back to myself using my loopback address. 
http://127.0.0.1/chem/path-to-file.html or 
http://wine-and-crackers.local/chem/path-to-file.html

I downloaded firefox to test it out, and, cool, I’m surprised that Firefox can 
run the app locally using file:///path-to-file.html. It also seems to load the 
data files more quickly.

> 
> 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.
[...]

--
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

Reply via email to