Awesome HTML5 feature that helps to set the IFrame height dynamically.
Use the following script
<script type="text/javascript" >
$(document).ready(function(){
window.setInterval(resizeParentIframe, 2000);
});
var pastHeight = 0;
function resizeParentIframe() {
var currentHeight = document.body.scrollHeight;
if (currentHeight != pastHeight){
pastHeight = currentHeight;
parent.postMessage(document.body.scrollHeight, '*');
}
}
</script>
Use the following script
<script type="text/javascript" >
$(document).ready(function(){
window.setInterval(resizeParentIframe, 2000);
});
var pastHeight = 0;
function resizeParentIframe() {
var currentHeight = document.body.scrollHeight;
if (currentHeight != pastHeight){
pastHeight = currentHeight;
parent.postMessage(document.body.scrollHeight, '*');
}
}
</script>