If I add the following HTML to a webpage it renders just fine:
<iframe src="http://website.com" id="#iFrameContainer"style="position:fixed; top:0px; bottom:0px; right:0px; width: 100%; border: none; margin:0; padding:0; overflow: hidden; z-index:999999; height: 100%;">');
However if I do the following jQuery:
$('#iFrameUpdate').replaceWith('<iframe src="http://website.com" id="#iFrameContainer"style="position:fixed; top:0px; bottom:0px; right:0px; width: 100%; border: none; margin:0; padding:0; overflow: hidden; z-index:999999; height: 100%;">');
Same goes for .html()
, .innerHTML()
... etc
It fails... throwing:
Mixed Content: The page at 'https://mainwebsite.com/' was loaded over HTTPS, but requested an insecure resource 'http://website.com/'. This request has been blocked; the content must be served over HTTPS.
I can't get HTTPS on the iframe source as I don't control that server fully.
Any ideas how to bypass this?