I have a parent page and inside that parent page, there is an iframe that is around half the size of the parent page.
The JavaScript in the iframed page is supposed to get the size of the iframed page and set the size of a text input, but both JavaScript's document.body.clientWidth
and jQuery's $(document).width()
are returning the parent page's width.
How do I get the width of the iframed page from scripts inside the iframe (that is, without having to send the iframe width from the parent page to the iframe page with querystrings)? They are cross-domain too.