tags:

views:

282

answers:

1

// if this code is inside iframe

var topWindow = window.top;

// then object topWindow.document is not accessible

topWindow.document.getElementById("iframe_id")); // doesn't work

+1  A: 

Are both the top window document and the page with the script on the same domain? You can't access content in a frame unless they are on the same domain.

This has actually been discussed in quite a bit of detail here. http://stackoverflow.com/questions/958997/frame-buster-buster-buster-code-needed/

Hugoware
No, different domains. I just need to display a dialog window at the iframe position.