Please take another look at
http://www.stolaf.edu/people/hansonr/jmol/test/json/property.htm
this page tests additions to Jmol.js in relation to applet.getProperty()
One discovery that I have made is that Opera (and possibly other
browsers) has a very strange bug. It turns out that if you create a
reference to the applet, say with document.getElementById("jmolApplet0")
WITHIN THE FIRST 150 MS OF PAGE LOADING (probably while the applet is
initializing in some way) you get an applet object -- there is no error
-- but this object has no functions. For example,
myApplet = document.getElementById("jmolApplet0")
alert(myApplet.script)
reports that "script" is unknown.
Again, this only occurred for me with Opera, and only within the first
150 ms of page loading.
Worse yet, if such is done within the first 150 ms of page loading, then
FROM THEN ON one has no access to any applet method. Apparently the
first getElementById() caches the (wrong) object reference, and any
later reference to the applet is trashed.
OK, so as a test, I've created the above file. It waits ten full seconds
after page loading to start looking for the applet. I'm wondering if
this is any solution for cases where previously people reported messages
indicating the applet was found, but "getProperty" was not found.
Of course, the bad news is that then ANY DIRECT ATTEMPT to discover
whether the applet has loaded and, for example, if a file has loaded, is
bound to fail with some browsers.
1) does the page display?
2) do you see a model of caffeine?
Please wait until you get the message "starting applet polling"
before continuing:
3) do the links on the left load new models?
4) do the links like [atomInfo] work -- display info in the textarea?
Thanks,
Bob Hanson
--
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
"Imagination is more important than knowledge." - Albert Einstein
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Jmol-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-developers