/ Published in: JavaScript
Bind onload function to the iFrame and set the size of the iFrame to the iFrames loaded content. In the example jQuery is used.
Expand |
Embed | Plain Text
$("#modalIFrame").bind('load', function () { var newheight, newwidth; newheight = this.contentWindow.document.body.scrollHeight; newwidth = this.contentWindow.document.body.scrollWidth; $(this).height(newheight); $(this).width(newwidth); } ); $("#modalIFrame").attr('src', url);
You need to login to post a comment.
