Permission denied in Iframe


I’m using dhxWins to display a glossary, and want to hide the top menu (for more visibility).

The site is displayed correctly but when I try to access to an Iframe content, I’ve got an error message:
“Permission Denied to access Window.document Property”

Here’s the code :

if (!win) {
  win = dhxWins.createWindow("id_win", 125, 20, 880, 500);
  win.attachEvent("onClose", function(win){win.setModal(false);win.hide();});
else {;

win._frame.onload = function () {
  win._frame.contentWindow.document.getElementById('header').display = "none";

Same error with “.style.visibility = “hidden””

And the error message (in French)

Message : Permission refusée à <http://devel> d'obtenir la propriété Window.document de <>.

Do I make an error somewhere ?

Thanks for helping.


iframe content is available only if iframe page is loaded from the same domain as the parent page. Moreover, it would be better to set onload handler directly in the page that is loaded into iframe.

Thank you Alexandra for this answer.

But I can’t modify the page.
I’ll have to find another way to display the content (using curl ie).