Forum Moderators: open
In the iframe, I want to be able to hide the <div> (this will also hide the <iframe>
Ps.: I MUST have the <iframe> in the <div>.
The code
------------------------------------
<script language="javascript">
function showaction(url) {
document.getElementById("pjaction").style.visibility = "visible";
document.getElementById("pjactionifrm").src="?popup=1&pj=" + url;
}
function hideaction() {
document.getElementById("pjaction").style.visibility = "hidden";
}
</script>
<div id="pjaction" class="pjpanel" style="position:absolute;top:10px;left:10px;width:802px;height:530px;visibility:hidden;">
<iframe id="pjactionifrm" src="?popup=1&pj=a_empty" style="width:800px;height:500px;"></iframe><br />
<center><a href="#" onclick="hideaction();">-- Fermer --</a></center>
</div>
------------------------------------
The code in the page of the iframe that must close the pjaction <div>:
------------------------------------
<script type="text/javascript">
window.getElementById("pjaction").style.visibility = "hidden";
</script>
------------------------------------
But this code doesn't want to hide the div :(
document.getElem... also doesn't work.