OK, I've collected some data a bit more systematically. First, I had my Mac versions wrong. I said "10.3.8." When I looked more closely I found two machines with 10.3.4 and two with 10.3.5. Sorry about that in relation to previous posts. The discussion previously re getElementById() refers to the 10.3.4 machine specifically. I don't know how to check the Java version on these machines that are public St. Olaf machines, so all I have is Mac OS and Safari versions.


Behavior with the following pages.

1a. http://www.stolaf.edu/people/hansonr/jmol/applet/mscalc/moveto.htm
 ----all scripts use document.jmol.script()
 ----does not employ setTimeout()

1b. http://www.stolaf.edu/people/hansonr/jmol/applet/mscalc/moveto_byid.htm
 ----unless otherwise specified, all links use document.getElementById()
 ----does not employ setTimeout()

2a. http://www.stolaf.edu/people/hansonr/jmol/applet/mscalc/view.htm
 ----uses document.jmol.script() if available;
     otherwise uses document.getElementById()
 ----employs setTimeout()

2b. 
http://www.stolaf.edu/people/hansonr/jmol/applet/mscalc/view_NOSETTIMEOUT.htm
 ----uses document.jmol.script() if available;
     otherwise uses document.getElementById()
 ----does not employ setTimeout()


========== Windows XP/NN7.2 or I.E.

1a,1b,2a,2b all work fine

==========
Windows XP/Opera 8.0

1a. works fine
1b. works fine
2a. works fine
2b. locks up application when OK is clicked; must click [x] to exit.

=========
Mac 10.3.4/Safari 1.2.2

1a. works fine
1b. document.getElementById().script() links do not work
    document.jmol.script() links work fine
2a. works fine
2b. works fine

==========
Mac 10.3.4/Safari 1.2.3

1a. exits Safari on link click
1b. exits Safari on link click
2a. exits Safari upon clicking OK
2b. exits Safari upon clicking OK

this machine also exits Safari at http://jmol.sourceforge.net/demo/jssample1/
when the "Reset to original orientation" button is pressed, so I guess there's no sense in worrying about it! It's hopeless.



So, Tim, I guess what I have to say is that it isn't as simple as using getElementById() on ALL Mac/Safari patforms. Don't know if it goes beyond 10.3.4 or not. By the way, on this machine both


javascript:alert(document.getElementById("jmol"))

returns "Object applet", and

javascript:alert(document.getElementById("jmol").script?1:0)

returns "1" indicating that the script() function is there, but it still can't access it. On this machine one HAS to use

document.jmol.script() or the equivalent document["jmol"].script()

of course, substituting the actual applet name for "jmol" in each case.

Go figure!

Bob Hanson








timothy driscoll wrote:

On 2005-04-21 (16:25) Bob Hanson wrote:


Can you describe again what the different behavior you observe is
between the web-based one and the one you modified? Could you please
put up the changed version somewhere so we could compare? That could
be really useful.



in a rush, but had to fire this off:

all I did was modify showscript to say document.getElementById("jmol").script instead of 
document.jmol.script, and I added id="'+name+'" to getApplet().

more later - sorry...


tim

--

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


------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Jmol-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to