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

Comments (5)

1 BrijeshAmin commented Permalink

Hi Peter, <div>&nbsp;</div> 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? <div>&nbsp;</div> Regards, <br /> Brijesh

2 louisprudent commented Permalink

Example <div>&nbsp;</div> An iframe with a specified height and width: <br /> <iframe src="/default.asp" width="200" height="200"><br /> <p>Your browser does not support iframes.</p> <br /> </iframe> <div>&nbsp;</div> <div>&nbsp;</div> <a href="http://isaallowance.org.uk" rel="dofollow" rel="nofollow">ISA Allowance</a>

3 bobleah commented Permalink

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

4 PeterYim commented Permalink

Hi Brijeshamin, <div>&nbsp;</div> 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. <div>&nbsp;</div> Peter

5 BrijeshAmin commented Permalink

Hi Peter, <div>&nbsp;</div> 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. <div>&nbsp;</div> Brijesh <div>&nbsp;</div> <div>&nbsp;</div>

Add a Comment Add a Comment