Phil,
Although the error message is confusing, you may be correct about
timing. The following approach might work:
jmolApplet([450, 460], 'javascript "jmolInit()";')
A while back I raised the issue of the javascript command not working in
MSIE, but I was flat out wrong on that point. If your problem is timing,
the above should solve the problem with an appropriate jmolInit function.
Otis
Otis Rothenberger
chemagic.com
On 7/21/2010 1:43 PM, Philip Bays wrote:
Sorry to be such a pest on this, but I still have issues with Mozilla
browsers. I have read the Wiki. I understand that launching a file
(///file......) requires that the 4 structure files must be in and at
the same level or below jmol.jar. I a a little stubborn on this issue
since I like to simply replace my jmol directory when a new edition
comes out.
But I also read that using the server and accessing by
http://192.blah.blah.blah will behave like the eventual campus web
site site will -- and that the above arrangement of files is not
necessary.
If I am wrong to this point, correct me and don't read further:-)
I have written a very simple page with the following script:
<script src = "../jmol/Jmol.js" type = "text/javascript"></script>
<script type - "text/javascript">
jmolInitialize("../jmol","JmolApplet.jar");
jmolApplet(["300","300"]);
var script = 'load "Structures/molecule4.pdb"';
jmolScript(script);
</script>
Now, to begin with, I realize that I could simply put the load script
into jmolApplet() and that does seem to work for me. However, I am
ultimately going to want to randomly generate the choice of the
molecule to put into the applet. So I will ultimately want the
loading commands elsewhere -- in a function that I can call to
generate the random number and load the applet for each new problem:
no seed to reload the applet itself each time.
Using the http:// ..... this script, as written, bombs most, but not
all of the time, in Firefox on the Mac with the following error
message in the Java Console:
load >> "Structures/molecule4.pdb" <<
eval ERROR: java.security.AccessControlException: access denied
(java.util.PropertyPermission http.agent read)
----
load >> "Structures/molecule4.pdb" <<
Accessing this web site from another mac on the network gives the same
result. The failure also occurs sometimes but less frequently with
safari. I have a colleague who cannot get it to load from her windows
machine at all. It works for me on my home network using Firefox (but
it might be an old version) on Vista.
The script works if the signed applet is used.
What is going on? It occurs to me as I write this note that it might
be a timing issue -- the file trying to load when the applet is not
completely loaded. Is that the sort of error message you would get
in that instance?
J. Philip Bays
Professor of Chemistry
Science Hall 172
Saint Mary's College
Notre Dame IN 46556
(574) 284-4663
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users