0

I have a site which embeds a survey from a different domain inside an iframe. However, in some browsers when third party cookies are disabled the iframe predictably is blank.

If the iframe does not load content I wish to show just a link instead of the iframe window itself, with javascript. So far I have

<iframe id="iframe" onload='setFrameLoaded();' width="600" height="500" src="about:blank"></iframe>

and the script

var frame_loaded = 0;
function setFrameLoaded() {
    frame_loaded = 1;
}

But when I change the source to about:blank the iframe still loads okay (again, probably expected behaviour).

Can I check whether the iframe has content loaded (despite it being from a different domain)?

Benjamin King
  • 15
  • 1
  • 4

0 Answers0