Iframe failed again

I have a question similar to the one in Detecting iframe Problem Content Load Failure . I am assembling a webpage that loads a google calendar as an iframe. I know that a large number of computers that will be using my webpage will have limited internet access to prevent the Google calendar from loading into the iframe. I would like to put a "timer" on my page that stops trying to load the google calendar after a certain time or tries, and instead loads a local page that says the calendar cannot be accessed.

I am trying to use the function checkForContents()

described earlier, but now I realized that I cannot get any object properties from google site. In other words, document.getElementById(iframe).contentWindow.document

it returns nothing (or at least nothing useful) and the function fails, but completely. Instead, I can use document.getElementById(iframe).contentWindow

that just returns "[object Window]" (and I'm not smart enough to do anything useful).

Any thoughts? Thanks.

+1


a source to share


1 answer


security sandbox reasons, you cannot access or modify any content if the domains are different from each other.



+1


a source







All Articles