I have an HTML embedded CDF on my website. The size that is actually being used up by the single manipulate in the CDF changes when you use the CDF; you can make more sliders appear, and then it will take up more space.
I have jQuery embedded in the page, so you can easily snoop around in the HTML DOM tree.
If you view the page in Firefox, and you got the Firebug extension, you can type in Firebug $("embed").height()
which will give you the result 400, which is the hardcoded value I gave for the height of the embedded CDF content. I can change that height later on, if I want to, for example $("embed").height(300)
will make the cdf take up less space. However, there appears to be no way to find out from JavaScript how much space is currently being used up by the CDF (or by the single Manipulate within the CDF, to be precise).
I'm actually pretty sure that it's impossible, but I would love to be proven wrong. Any ideas?
update
if you know of a way to specify something like "height='100%'", meaning, "height = whatever is needed", that would be even better. "100%" for the height parameter in the JavaScript call to cdf.embed does not work, I tried that.
update
@Vitaliy: Thanks, I figured it out thanks to your comment, will post solution shortly.