I have to Set Iframe Height Dynamically using Jquery or Javascript . I am Using following jquery code:
var theFrame = $("#IframeId", parent.document.body);
theFrame.height($(document.body).height);
My Problem is that data in iframe has some Images,video thumbnail which are coming from diffrent server Amazon,flicker (means from Cross domain). It takes time to load. So Iframe Height is not Set Exactly .
how can i set Exact height of iframe???????
To Set Iframe Height Dynamically
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Kirtan PatelRank #292 · 8.6K reputationPosted Nov 21, 2009, 5:54 AM EST
Write java Script Like Below To meaure Hight of Content Within the Ifame and Set Height according to this function resizeIframeToFitContent(iframe) { // This function resizes an IFrame object // to fit its content. // The IFrame tag must have a unique ID attribute. iframe.height = document.frames[iframe.id] .document.body.scrollHeight; } function resizeIframeToFitContent(iframe) { // This function resizes an IFrame object // to fit its content. // The IFrame tag must have a unique ID attribute. iframe.height = document.frames[iframe.id] .document.body.scrollHeight;after that Call that Function in OnLoad Event of Iframe