mvogel
03-29-2008, 10:43 PM
I have a webpage which contains an iframe (served from the same domain so no security restrictions). I have no ability to change the page in the iframe unless I can write javascript from its parent (the page with the iframe in it).
Whoever wrote the framed page used incorrect dom syntax and makes reference to "parent.document.location" instead of "document.location". When the framed page is in its own window I presume it doesn't matter since it's the top window so parent.document.location and document.location are the same. But when viewed through an iframe, the use of the parent.document... instead of document... is causing null references and errors.
Is there anyway from framing page to write some javascript that corrects the javascript in the framed page. In other words, is there some way to change parent.document.location to document.location via javascript in the parent page?
Whoever wrote the framed page used incorrect dom syntax and makes reference to "parent.document.location" instead of "document.location". When the framed page is in its own window I presume it doesn't matter since it's the top window so parent.document.location and document.location are the same. But when viewed through an iframe, the use of the parent.document... instead of document... is causing null references and errors.
Is there anyway from framing page to write some javascript that corrects the javascript in the framed page. In other words, is there some way to change parent.document.location to document.location via javascript in the parent page?