• Add a Comment
  • Edit
  • More Actions v
  • Quarantine this Entry

Comments (5)

1 BrijeshAmin commented Permalink

Hi Peter,

Thanks for the valuable information. I faced the same issue with an application that I am still working on. In my case I DO NOT have control over the iframed document. The application calls a web service that returns a dynamic URL and the iframe displays the content using this URL. In this case is there an approach to determine the height of iframe? I have tried several solutions but none of them works perfectly. Any sugestions?

2 louisprudent commented Permalink


An iframe with a specified height and width:
ISA Allowance

3 bobleah commented Permalink

Great tip Peter! Thanks for sharing with our audience!!

4 PeterYim commented Permalink

Hi Brijeshamin,

this is this onload event iframe fires after the frame is done loading. I wonder you can write a handler to listen to the onload event and then access the iframe.contentDocument for the document object. Once you have the document object. You can do what I have in the example - pass the document.body.scrollHeight to the resizeIframe function. Let me know if this works.

5 BrijeshAmin commented Permalink

Hi Peter,

Thank you for your prompt response. I was able access to document object of iframe only if the iframe was loaded from same domain. But the webservice that returns a URL for the iframe that is a different site and domain. In this case lots of cross site scripting issues arise and the document object is not accessible. To summarize our requirement is to implement something similar to mashup.

Add a Comment Add a Comment