Bob Hanson wrote:

[snip]
> ....OK, I have that now in 
> http://www.stolaf.edu/academics/chemapps/jmol/docs/examples-11/new.htm


Amazing and delightful!

Works fine in WinXP:
        Firefox 1.5
        Opera 9.0
        Netscape 7.0
        Mozilla 1.7.12
but
        IE 7 and 5.5:  new window is empty -no applet- 

As for the source of trouble, I try to guess:
1) Some Microsoft security -protect you from yourself? ;-)
2) Bob, I had a look at Jmol.js, and think that in 
        _jmolGetAppletSize()
you are adding "px" even if size is in percent?

IE says "runtime error - object was expected" (cannot find in which 
point, since all is in one line and MS Script Editor doesn't give 
more clues -or I don't know how to)

Firefox javascript console -although it basically works- says:
Error:  an end of value was expected for the property, but 'px' was 
found.  Error while reading the value for the property 'width'.  
Declaration rejected.
Source file: 
http://www.stolaf.edu/academics/chemapps/jmol/docs/examples-
11/new.htm
Line: 0

and same for 'height'

I would say my observation above is right, and some browsers forgive 
the error while others don't.
Specifically:
http://www.stolaf.edu/academics/chemapps/jmol/docs/examples-
11/Jmol.js
/* Jmol 11.0 script library Jmol.js (aka Jmol-11.js) 9:53 AM 3/6/2007

line 773:
function _jmolGetAppletSize(size) {

lines 781-792:
  if (typeof width == "number") {
        if(! (width >= 25 && width <= 2000))
            width = (width < 1 && width > 0 ? (width * 100)+"%":300)
        width += "px"
  }
  if (typeof height == "number") {
        if(! (height >= 25 && height <= 2000))
            height = (height < 1 && height > 0? (height * 100)+"%":300);
        height += "px"
  }

I think they should be:
  if (typeof width == "number") {
        if(width >= 25 && width <= 2000)
        width += "px"
        else
            width = (width < 1 && width > 0 ? (width * 100)+"%":"300px")
}
  if (typeof height == "number") {
        if(height >= 25 && height <= 2000)
        width += "px"
        else
            height = (height < 1 && height > 0? (height * 100)+"%":"300px");
}


Right?



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to