I got this code from another source to use on my website,
<!DOCTYPE html>
<html>
<head>
<script src="http://domain-name.co.uk/js/theirscript.js"></script>
</head>
<body>
<iframe src='http://domain-name.co.uk/quote/quote_0.numo?id=mySplID' id="ifHolderQuote" width="660" frameBorder="0" marginwidth="0" marginheight="0" scrolling="no" allowTransparency="true" onload="resizeCrossDomainIframe('ifHolderQuote', 'http://mySplDomain.co.uk');">
</iframe>
</body>
</html>
but for some reason, when I view the plain HTML file using my browser I cannot see it completely. It only shows a small section like this.
However in the actual test file uploaded in their website I can view the complete iFrame.
Any idea how can I fix my code to reflect the change? This is the scrip that is used.
function resizeCrossDomainIframe(id, other_domain) {
var iframe = document.getElementById(id);
window.addEventListener('message', function(event) {
if (event.origin !== other_domain) return; // only accept messages from the specified domain
if (isNaN(event.data)) return; // only accept something which can be parsed as a number
var height = parseInt(event.data) + 40; // add some extra height to avoid scrollbar
iframe.height = height + "px";
}, false);
}
EDIT: I uploaded the file to the server to see if there was some problem with opening it locally from the browser, even after uploading to the server it did not work.