I am a Zope newbie and would really appreciate some help from
experienced Zope developers. I am trying to incorporate jmol (a
javascript molecule viewer: http://jmol.sourceforge.net/)  into some
web pages. I think that my confusion may have to do with the use of
'directory relative (../)' versus 'server relative (/)' versus
'absolute url (http://)' paths.

The instructions for jmol give an example as follows:

    <title>Simple example</title>
    <script src="../jmol/Jmol.js"></script>
      jmolInitialize("../jmol"); // REQUIRED
      jmolApplet(200, "load caffeine.xyz");

I have set up a folder in Zope for jmol's files (Jmol.js, JmolApplet.jar):

I have a Zope folder for the molecule files to be viewed:

I have a dtml method for the actual view page:

I would appreciate very much if someone could help translate the
example above using my Zope folder structure. I have tried many
variations, but they usually end up locking up the browser with a
'downloading applet' message.

Related to this is the following question: should I use use the actual
file names 'Jmol.js' , 'JmolApplet.jar' as their IDs, or should I use
'dotless' names and just set the correct file types?

Thanks for any help and advice you can give.

Best Regards,

>From the jmol website "General Recommendations":

- There is one directory on your web server that contains Jmol.js,
JmolApplet.jar, and any other jmol-specific files. For the purposes of
this discussion we will call this directory ../your-jmol-directory.

- Every web page within your site should refer to
../your-jmol-directory using a relative url.

- Directory relative paths which start with . or .. should always be
used. Server relative paths which start with / might be acceptable in
special circumstances. Absolute URLs which start with http:// are evil
and should never be used.

- Every page must contain the following HTML command in the head
section in order to include the Jmol.js library:

    <script src="../your-jmol-directory/Jmol.js"></script>
Every page must contain a call to jmolInitialize(codebaseDirectory) as
the first call into the Jmol.js library.
Zope maillist  -  Zope@zope.org
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to