I would use:

var w = jmolEvaluate("_width")
var h = jmolEvaluate("_height")


Angel Herráez wrote:

>I'm trying to read an applet size. Right now I'm using
>       var info = jmolGetPropertyAsArray("appletInfo")
>       var n = info.htmlName
>       var iH = document.getElementById(n).height
>       var iW = document.getElementById(n).width
>
>But I can only use this successfully with pixel-sized applet, not 
>percent-sized applet (the 
>percent value read is of no use to me).
>
>I wonder whether there is
>a) a way to read the current pixel size of the applet, even if the applet was 
>invoked as 
>percent.
>or 
>b) a more direct --or better-- way of reading size without going through 
>"appletInfo"
>
>Couldn't find any other in
>http://chemapps.stolaf.edu/jmol/docs/?ver=11.4#getProperty
>
>(My need is because I'm working on image export from the applet, and Firefox 
>seems to 
>need to be given the image size in pixels, or it doesn't show anything)
>
>BTW, the "show image" link in 
>http://chemapps.stolaf.edu/jmol/docs/examples-11/new.htm 
>is no longer working for me in Firefox, there is instead a broken image icon 
>above the Jmol 
>state info; I see now that it works OK in Opera, so it may be the same problem 
>I'm seeing in 
>my page.
>
>
>
>-------------------------------------------------------------------------
>This SF.net email is sponsored by: Microsoft
>Defy all challenges. Microsoft(R) Visual Studio 2008.
>http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>_______________________________________________
>Jmol-users mailing list
>[email protected]
>https://lists.sourceforge.net/lists/listinfo/jmol-users
>  
>


-- 
Robert M. Hanson
Professor of Chemistry
St. Olaf College
Northfield, MN
http://www.stolaf.edu/people/hansonr


If nature does not answer first what we want,
it is better to take what answer we get. 

-- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to