Hi,

I'm writing an application that prepares input for the COLUMBUS
quantum chemistry program using the Mozilla Development Platform and
other open source codes and data, including the Jmol Applet.  So far
the applet interface is working when I use a URL (actually just a
file).   I prepare an HTML file and load it into an XUL <iframe> using

var htmlPane = document.getElementById("html-pane");
htmlPane.setAttribute("src",("file://" + apfs));

My goal is to allow multiple users and instantiations of the Jmol
Applet.  I can't use an HTTP server and I'd prefer not to use files if
possible.  I'd like to load the HTML on the fly using a string
constructed in the XUL JavaScript code, for example,

jmolSetDocument(htmlPane.contentDocument);
htmlPane.contentDocument.write(ahtmlString);

I've tested this for simple HTML (no simple applets yet) and it works.
 When I use it with the following in a string

<html>
        <head>
                <script type="text/javascript" language="javascript"

src="file:///home/c-ingen/chrome/content/c-ingen/jmol/Jmol.js">
                </script>
                <script type="text/javascript" language="javascript"

src="file:///home/c-ingen/chrome/content/c-ingen/jmol_dlg.js">
                </script>
        </head>
        <body id="page-body" bgcolor="#000000" onLoad="resize();" onResize="res
ize();"
                        topmargin="0" leftmargin="0" marginwidth="0" marginheig
ht="0">
                <script type="text/javascript" language="javascript">
                        jmolDebugAlert(true);
                        jmolInitialize("jmol/");
                </script>
                <form>
                        <script>
                                var current_molecule =
"1\n" +
"\n" +
"H 0. 0. 0.\n";
                                jmolAppletInline(400, current_molecule);
                        </script>
                </form>
        </body>
</html>

It executes the Jmol JavaScript ok and hangs after the JS.  This same
HTML works with htmlPane.setAttribute using a file.  I've tried
various combinations of absolute paths and they don't work.

It seems to be a problem with the Java interface.  Before I dig into
the Java, I was wondering if people with more experience with this
sort of thing could offer some advice.

Thanks,
Gary

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Jmol-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-developers

Reply via email to