> I was one (apparently of many) with the same issue.  I found two
> solutions.
>
> If you have your jmol files in the same subdirectory as your html file,
> you can reference it by by pointing one directory up and then down to
> your subdirectory.

I do not understand the need to do this.

> Eventhough this is the same directory the html file
> is in, you still seem to have to refer up and then down for it to work.
> So the commands from the examples  on the jslibrary  page (Example 1
> below) work if all files (html, xyz, Jmol.js, and JmolApplet.jar) are in
> the same  subdirectory named "/jmol".  What the jslibrary page tells you
> to do (use two different subdirectories for you html and jmole files)
> works on the server but not on the hard drive.

Sorry, I do not understand.

Exactly what is it that the Jmol.js library tells you to do that does not
work properly when running from a local file system.

> This fix requires that all files be in one subdirectory.  This is
> convenient if you are working on just one page.  But it can be a pain if
> you have lots of html and pdb files because they all have to be in one
> directory which can get kind of cluttered.  If you want to use different
> directories to organize your work, you have to have a separate copy of
> the jmol files in each directory.  Futhermore,  if you move an html
> files to a subdirectory with a different name, you have to change the
> name of all the subdirectory references in the html file.

Duplicating the Jmol system files is certainly a problem.

Several people have reported that one can successfully retrieve files from
subdirectories of the .html page "document base" directory. However, this
does mean that you need to put the .html files all in the same place ...
although the data files can be placed in a subdirectory.

> The other option (Example 2) that worked for us and was a little more
> convenient was to put the jmole files one directory up from the html and
> xyz files.  You can then reference the jmol files with "../".

I believe this is not portable and will fail on some platforms ... MSFT IE
with the MSFT JVM ?

> This way
> you can have one copy of the Jmol.js and JmolApplet.jar files in one
> directory and different subdirectories for each html file you are
> working on.  Since there are no directory names in the html file, as
> long as you keep this directory structure when you transfer files to the
> server, you should never have to edit the directory references in the
> html files.
>
> EXAMPLE 1:  These commands from the examples on the jslibrary page at
> http://jmol.sourceforge.net/jslibrary/ work if the html file is in the
> "/jmol" subdirectory along with the Jmol.js and xyz file.<>
> <script src="../jmol/Jmol.js"></script>
> jmolInitialize("../jmol"); // REQUIRED
> "load caffeine.xyz");
>
> EXAMPLE 2:  This variation of the commands above work if the Jmol.js and
> JmolApplet.jar files are one directory up from the html and xyz files:
> <script src="../Jmol.js"></script>
> jmolInitialize("../"); // REQUIRED
> "load caffeine.xyz");
>
> DISCLAIMER - This fix was worked out by a biochem prof who knows almost
> nothing about Java and worked for me on one computer and one server.

OK

Per my previous comment, accessing files above the "document base" of the
.html file will have security problems on some systems.


Miguel



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to