Is there a way to detect the height and width of an iframe, by executing a script from inside the iframe? I need to dynamically position some elements in the iframe according to the different height/width of the iframe.
Would there be any difference if there are multiple iframes in the same page? i.e. each iframe wants to find its own dimensions.
Javascript or jquery solutions welcomed.
Thanks!
<iframe src='http://example.com' width='640' height='480' scrolling='no' frameborder='0' longdesc='http://example.com'></iframe>
The iframes have to be embeded on other sites, and as mentioned by one of the answers below, I've hit permission problems.