I have an iframe and I’d like to hide a div whithin it, so bascily people can’t for example sign out in the iframe.
What I did was :
<script type="text/javascript">
function changeCSS(){
frame = document.getElementById("myIframe");
frame.document.getElementById("guser").style.display='none';
}
</script>
<iframe onload="javascript:changeCSS()" id="myIframe" src="{$docUrl}" width="800px" height="600px"></iframe>
But I can’t get it to hide the div “guser”.
If anyone could help I’d be very much appreciated.
try
frame.contentWindow.document.getElementByIdorframe.contentDocument.getElementById