<!-- MDN PolyFils for IE8 (This is not normally needed if you use the jQuery version) -->
<!--[if lte IE 8]>
<script type="text/javascript" src="../js/ie8.polyfils.min.js"></script>
<![endif]-->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script type="text/javascript" src="js/iframeResizer.min.js"></script> <!-- OJO CON LA RUTA -->
<script type="text/javascript">
/*
* If you do not understand what the code below does, then please just use the
* following call in your own code.
*
* iFrameResize({log:true});
*
* Once you have it working, set the log option to false.
*/
iFrameResize({
log : true, // Enable console logging
inPageLinks : true,
resizedCallback : function(messageData){ // Callback fn when resize is received
$('p#callback').html(
'<b>Frame ID:</b> ' + messageData.iframe.id +
' <b>Height:</b> ' + messageData.height +
' <b>Width:</b> ' + messageData.width +
' <b>Event type:</b> ' + messageData.type
);
},
messageCallback : function(messageData){ // Callback fn when message is received
$('p#callback').html(
'<b>Frame ID:</b> ' + messageData.iframe.id +
' <b>Message:</b> ' + messageData.message
);
alert(messageData.message);
document.getElementsByTagName('iframe')[0].iFrameResizer.sendMessage('Hello back from parent page');
},
closedCallback : function(id){ // Callback fn when iFrame is closed
$('p#callback').html(
'<b>IFrame (</b>' + id +
'<b>) removed from page.</b>'
);
}
});
</script>