On Aug 18, 2006, at 2:04 AM, Bob Hanson wrote: Frieda, or anyone else with this Mac problem:
If you are willing, we can test this on your machine. I've added a little feature to that page that lets us test your browser.
2) pop up the "atom expressions" example
------------------------------------------- Test 1: Is it using the Object code for the applet? You should see just under the applet: -------------------------------------------
Jmol Version 11.0(beta) 2006/08/15 using Jmol-11.js object applet
If not, that's ok. Just tell me what it says.
It says:
3) Carry out each of the following tests by typing into the VERY FIRST LINE of the text area and each time pressing [ Execute ] (not just the ENTER key). Pleaes report back to me what you get. What we are looking for is the command that will get that applet function to report back a nice message about the applet. Feel free to experiment.
------------------------------------------- Test 2: Does my test work at all? -------------------------------------------
js: 1+2
You should see an alert that says "3", because I have "js:" coded to mean "run this as _javascript_". If you don't get that, don't continue.
I do get the alert that says "3" Try loading or twice to force your cache to clear. You should get a version that reads
// popupscript.js for Jmol interactive script documentation // 11:41 PM 8/17/2006
at the top. Then repeat step (1)
------------------------------------------- Test 3: Is the document found? -------------------------------------------
js:document
You should get something like "object HTMLDocument"
yes, I get exactly that in an alert, in square backets.
------------------------------------------- Test 4: How can we address the applet? -------------------------------------------
js:document.jmolAppletX
I get [object OBJECT]
OK, this is probably going to be the problem. You should get something like "object HTMLObjectElement" or some fancy _expression_ including height and width or something. Some OSs will give "undefined", which means this isn't the way to find the applet. But there are several other ways. Try ALL of these (even if the above works, please).
js.document["jmolAppletX"]
I get not response. js:document.getElementById("jmolAppletX")
I get [object OBJECT] js:document.applets[0]
I get [object OBJECT] js:document.applets["jmolAppletX"]
I get [object OBJECT] js:document.getElementsByTagName("jmolAppletX")
I get [object NodeList]
If none of those return anything useful, you are on your own. I don't know what to suggest.
I do not know if what is above constitutes "anything useful" or not... ------------------------------------------- Test 5: Can we access the applet functions? -------------------------------------------
For all the return something interesting, try adding ".getAppletInfo"
js:document.jmolAppletX.getAppletInfo gives me function getAppletInfo()
js.document["jmolAppletX"].getAppletInfo gives me no response
js:document.getElementById("jmolAppletX").getAppletInfogives function getAppletInfo()
js:document.applets[0].getAppletInfogives function getAppletInfo()
js:document.applets["jmolAppletX"].getAppletInfo gives function getAppletInfo()
js:document.getElementsByTagName("jmolAppletX").getAppletInfo gives undefined
So, for example:
js:document.getElementById("jmolAppletX").getAppletInfo
This should return something about this being "native code". BUT, on SOME MAC SYSTEMS, even if this step works, LiveConnect, which allows running those functions, still doesn't work.
------------------------------------------- Test 6: Can we call any applet function? -------------------------------------------
Provided that worked,
since I did not get anything about "native code" I assume it did NOT work, and will not do Test 6. Let me know if I should. now try adding the empty parentheses. My experience is that on some Macs even if you find the applet, even if you can see that there is a function there, you still cannot actually run it.
js:document.getElementById("jmolAppletX").getAppletInfo()
If none of these gives a nice message about the applet version and sourceforge, we're out of luck.
------------------------------------------- Test 7: Can we run a Jmol script? -------------------------------------------
Again, I will not do this Test unless at this point it would be useful.
Final mission: Find the equivalent way on your machine to do this:
If Test 7 would help: What do you mean by "find the equivalent way to do this"?
js:document.getElementById("jmolAppletX").scriptWait("background red") js:document.getElementById("jmolAppletX").scriptWait("load caffeine.xyz")
If you can find that, we are in business. If not, I don't know what to suggest. As I remember sometimes what is happening is that the popup window no longer has access to the resources of the original page -- namely the files in the directory of the JAR file.
I do see the same error repeated several times in the js console: Look for any sort of console error or _javascript_ error you can find.
java.net.MalformedURLException: no protocol:
Thanks Bob, Frieda ///////////////////////////////////////////
Frieda Reichsman, PhD Molecules in Motion Interactive Molecular Structures http://www.moleculesinmotion.com
/////////////////////////////////////////// |
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users