I have now had a chane to look at this on both a PC and a Mac. We are dealing with a platform issue I think at this point. Your hack works fine on the PC, but not on my Mac. I will continue to look at where the problem lies and then hack another piece of code. Appreciate your help!!
Phil
On Sep 13, 2004, at 1:22 AM, Bob Hanson wrote:
Phil, I still suggest the messageCallback, at least for now, despite the fact
that Miguel thinks it's too complicated. I think I forgot to mention that I load
a single-atom "dummy" file with the applet as it is written to the page. That,
with a script parameter triggers the message "Script completed"
Here's my code that works (for me) for your page hacked at
http://www.stolaf.edu/people/hansonr/temp/test.htm
isok1=false isok2=false
function checkload1(j,m){ if(isok1)return if(m.indexOf("completed")>=0){ isok1=true if(isok2)setTimeout("newProblem()",1) } }
function checkload2(j,m){ if(isok2)return if(m.indexOf("completed")>=0){ isok2=true if(isok1)setTimeout("newProblem()",1) } }
Bob
Philip Bays wrote:
I now have a couple of observations.
1. onLoad works a lot better than onload --- sorry about that.
2. But it does not completely resolve the problem.
Here is what I am trying to do.
a. I have the applet load from the HTML portion of the page, but I do not put a molecule into it.
b. I have the javascript now determine the molecule to load and stick it into the applet.
If I do not use the onLoad command, but use a button that the user has to punch to get started, things work in all browsers on both Mac and PC.
www.saintmarys.edu/~pbays/Stereochemistry/BCC.htm
On the other hand, if I use the onLoad command, as in <body onLoad = "newProblem()"> I observe the following:
a. Works fine with safari
b. Works fine with Explorer on the PC
c. Stalls and ultimately crashes all of the Mozilla derived browsers with a request for an error report.
www.saintmarys.edu/~pbays/Stereochemistry/BCC912a.htm
I am using scripts to write the structure to the applet window. I define the script and then do a document.jmol.script(script) format. This has worked for me in other situations. The javascript debug panel in firefox tells me that :
document.jMol.script is not a function
Phil
J. Philip Bays
Professor of Chemistry
Science Hall 158
Saint Mary's College
Notre Dame IN 46556
(574) 284-4663
-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
_______________________________________________
Jmol-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jmol-users
--
Robert M. Hanson, [EMAIL PROTECTED], 507-646-3107
Professor of Chemistry, St. Olaf College 1520 St. Olaf Ave., Northfield, MN 55057
mailto:[EMAIL PROTECTED] http://www.stolaf.edu/people/hansonr
-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
_______________________________________________
Jmol-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jmol-users
J. Philip Bays Department of Chemistry and Physics Saint Mary's College Notre Dame IN 46556 [EMAIL PROTECTED]
-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
_______________________________________________
Jmol-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jmol-users

