A
Anonymous
Guest
Hi
how can I hide a DIV in another frame by JavaScript ?
how can I hide a DIV in another frame by JavaScript ?
<div name="mdiv">whatever</div>
.invisible {
display: none;
}
// And then...
<div name="mdiv" class="invisible">whatever</div>
<div style="display: none;">whatever</div>
<script type="text/javascript" language="javascript">
function HideShow() {
mydiv = document.getElementById('mdiv').style.display;
if(mydiv == 'none'){
mydiv = '';
}
else{
mydiv = 'none';
}
}
// So, calling this function will hide and show it depending on its status
// Not sure, but i think it will work :p
</script>
<script type="text/javascript" language="javascript">
function HideShow() {
if (document.getElementById('mdiv').style.display == 'none')
{
document.getElementById('mdiv').style.display = '';
} else
{
document.getElementById('mdiv').style.display = 'none';
}
}
</script>
<div id="mdiv">whatever</div>
parent.main.HideShow()