Using Javascript to write an iframe and set the size
I've got a Javascript function that embeds an iframe into a web page. Both the javascript file and iframe are served from mysite.com, and the iframe is written out to a page on example.com.
How can I set the size of the iframe without explicitly setting it? Can I embed the iframe and then modify the size after the fact? This would be done from within the iframe itself. I don't know if it's possible though because of Javascript security permissions.
Another thing I've considered is to do an HTTP call in the drawIframe function. Before it writes out the iframe, it'll perform an HTTP request to get the dimensions. Then it'll parse the output and set that as the frame size.
If I can set the frame size without an extra HTTP call I'd love it...so I'd appreciate any ideas.
Bookmarks