On Jan 18, 2014, at 12:07 PM, Robert Hanson <hans...@stolaf.edu> wrote:

[…]

> Again, there is a bug in that released version of Jmol2.js -- j2sPath and 
> javaPath and jarFile should have been all commented out and not present in 
> the first place.
>  
> 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.
> 
> 
> With that commenting out change, there should  not be any reason to change 
> the HTML file. 

I feel silly. You are absolutely right, when the j2sPath is commented out in 
the Jmol2.js file everything works, and there is no need to specify the 
location of the j2s directory in the html file. I hadn’t tried that.

> 
> 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.
> 
> I don't think so. This makes no sense. There can't be any Safari issue here. 
> This is very standard JavaScript.

It might not make sense, but when the html file contains this in the header
        <script type="text/javascript" src="../../reuse/JSmol.min.js"></script>
        <script type="text/javascript" src="../../reuse/Jmol2.js"></script>
        <script type="text/javascript">
                var Info = {
                                        use: "HTML5",
                        };
                Jmol._alertNoBinary = false;
        </script>
</head>
and in the body
        jmolInitialize("../../reuse"); //required 

I get an error in Safari and not in Firefox. When I remove the "var Info = 
{[etc]” everything works in both browsers.

>  
> 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>
> 
> You certainly should not have to do this.

You are right. I didn’t think to try leaving out all reference to the location 
of the j2s directory.

Thanks,
Chris

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

--
Learn about brittle bone disease...
http://www.oif.org

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