The HTML parent window and iFrame content know about each other and communicate freely when they live on the same web server. When they are saved to DVD, Chrome throws an "Unsafe JavaScript attempt to access frame with URL" when iFrame tries to contact top as a local file.
The catch below catches the permission error, but the error is still registered by the browser and visible to the user.
Is it possible to test first if this access is allowed before attempting to access to preclude the unsafe JavaScript error?
// Called from script in an iframe
function findSiblingIFrame(sibId) {
try {
var sibFrame = top.document.getElementById(sibId);
if (sibFrame != null) {
alert("found sibling iframe");
} else {
alert("did not find sibling iframe");
}
}
catch (err) {
alert("not allowed to find sibling iframe");
// Would rather test if permission first to prevent
// browser from registering the error.
}
}