Is it possible to control the style of a page from it’s parent with JS? Let’s say I wanted to load a page in an iframe and display:none; elements of that href from the parent page.
At best I’d like to do it by tag name.
Something like this:
[B]Parent.html
[CODE]<html><head>
<script type=”text/javascript”>
function hideIt()
{
var no = document.gotcha.href.document.getElementsByTagName(‘div’);
return ( no.style.display == “block” ? no.style.display = “none” : no.style.display = “none” );
}
</script>
</head><body>
<iframe name=”gotcha” src=”test.html” width=400 height=400></iframe>
<a href=”#” onclick=”hideIt()”>here</a>
</body></html>
[B]test.html
[CODE]<html><head>
</head><body>
<div>words</div>
</body></html>