On Oct 26, 2007, at 8:53 AM, Bob Hanson wrote:

> Jonathan, while I'm thinking of it.... one thing I'm going to do to  
> help
> is to have Jmol deliver to webexport the list of files required in  
> this
> rendering.
Thank you.  That will help a lot.  From my perspective a call to a  
function that returns a list of the files would be perfect.  How  
about viewer.getFilesUsed()?
>
> Jonathan Gutow wrote:
>
>> Dear All:
>>      I am trying to make it so that the user can easily do local tests of
>> pages made by the export to web function.  I've run into an
>> inconsistency in file security handling that is confusing me.  Here's
>> the issue:
>>
>> If I load a page locally with all the page data in a directory inside
>> the Jmol directory I can load scripts using the script command in the
>> console fine.  However, if I try to use a Javascript generated
>> JmolButton to load the script I get a
>> java.security.AccessControlException: access denied error.  Any clues
>> what I should look at to find the difference?  Thanks.
>>
>>
>>
> show us the example.
Here's what I'm doing.  The directory structure is /Jmol/tests/ 
folder_for_webpage/(.html, .js, .png, .spt .pdb).
The Jmol applet files are at the same level in the tree as the tests  
directory. I have set the path to the applet and the path to the .js  
files as "../.."  I definitely get different behavior in the console  
and using the button on the page.  Everything works fine if I set  
things up to work on the server.
Thanks for any suggestions.  Jonathan
____
Here's the pertinent snippet of the page:

<head>
<meta http-equiv="content-type"
content="text/html; charset=iso-8859-1">
<title>A web page containing Jmol applets</title>
<style type="text/css">
/* These are important, don't change: */
html, body { height:100%; overflow:hidden; margin:0; padding:0; }
.JmolPanels { position:absolute; overflow:hidden;}
.textPanels { position:absolute; overflow:auto; }
#JmolPane {left:40%; width: 60%; top:0px; height:100%; }
#mainPane { left:0px; width:40%; top:0px; height:100%; }
#JmolDiv {width:100%; height:100%;}
#Jmol0 {width:100%; height:100%;}
/* Don't add margin or padding to textPane; if needed, use an inner  
div with desired style (like 'contents' below) */

/* These are aesthetic, can be customized: */
.content { padding:0.5em 1ex; }
.textPanels { background-color:rgb(102, 255, 255); }
</style>
<script>
var dataDir = "."; // where the model AND .spt files are to be found.
</script>
<script src="JmolPopIn.js" type="text/javascript"></script>
<script type="text/javascript">
jmoljarpath = "../..";
jmoljspath = "../..";
</script>
<script type="text/javascript">
addJavaScript(jmoljspath, "Jmol.js");
</script>
<script type="text/javascript">
jmolInitialize(jmoljarpath, jmoljarfile);
jmolSetDocument(0);
</script>
</head>
<body style="color: rgb(0, 0, 0); background-color: rgb(102, 255, 255);"
onload="scriptbuttonJmol('ethylene.spt')">
<div id="JmolPane" class="JmolPanels">
<div id="Jmol0" class="JmolDiv"> <img src="ethylene.png"
alt="still of jmol image" style="height: 100%; width: 100%;"> </div>
</div>
<div id="mainPane" class="textPanels">
<div id="mainContent" class="content">Insert your TITLE and
<tbody>
<tr>
<td>
<script type="text/javascript">

document.write(jmolButton("script ethylene.spt", "ethylene"));

</script><br>
</td>
</tr>
</tbody>
</table>
</div>
<!--content--></div>
<!--mainPane-->
</body>
</html>
                          Dr. Jonathan H. Gutow
Chemistry Department                                 [EMAIL PROTECTED]
UW-Oshkosh                                           Office:920-424-1326
800 Algoma Boulevard                                 FAX:920-424-2042
Oshkosh, WI 54901
                  http://www.uwosh.edu/faculty_staff/gutow/




-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Jmol-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-developers

Reply via email to