IFRAME identifier and how to hide/show window

I’ve studied the following example but not figured how to access the isVisible or isEnabled feature:

Could someone show how to set the ‘isVisible’ property, and which identifier is requred? I tried ‘PageWeb’ as the ID to access the iFrame scene element but it isn’t working.

You can access the div container by doing document.getElementById("spDivPageWeb"). If you want to access the iframe, do document.getElementById("spDivPageWeb").childNodes[0].

If you want to hide the whole thing, just do document.getElementById("spDivPageWeb").style.display = "none".

However, this won’t work with the current PG because the style attribute of the div is rewritten with each frame, so the change in the display property will be reset just after you set it.

Use this PG instead, which does not overwrite the style attribute:

2 Likes