I have a question similar to that posed in the "Detect failure to load contents of an iframe" issue. I am putting together a web page that loads a Google calendar as an iframe. I know that a large number of the computers that will use my web page will have restricted internet access such that the Google calendar won't load into the iframe. I would like to put a "timer" into my page that stops trying to load the Google calendar after a set amount of time or attempts and instead loads a local page that says the calendar can't be accessed.
I have been trying to use the checkForContents() function described previously, but I have now realized that I can't get any of the object properties from the Google site. In other words, document.getElementById(iframe).contentWindow.document returns nothing (or at least nothing useful) and the function fails silently but totally. I can instead use document.getElementById(iframe).contentWindow which simply returns "[object Window]" (and I don't seem to be smart enough to do anything useful with that).
Any thoughts? Thanks.