Why getElementById("f2").style
When i used parent.document.f2.style.visibility it's not working
on other hand parent.document.getElementById("f2").style.visibil ity is working properly.Where I am wrong??
Since i want to use visibility by using "name" not by "id"
Any ideas?
**********MainPage.html *******
<body>
<table bgcolor=red>
<tr><td>
<iframe name="f1" id="f1" src="first.html"></td>
</tr>
<tr><td>
<iframe name="f2" id="f2" src="second.html" style="visibility:none"></td>
</tr>
<tr><td>
<iframe name="f3" id="f3" src="third.html"></td>
</tr>
</body>
**************first.html*****
<script>
function hello(val)
{
var obj;
if(val==2)
{ parent.document.getElementById("f2").style.visibil ity = "hidden";
}
if(val==3)
{ parent.document.getElementById("f3").style.visibil ity = "hidden";
}
}
</script>
<input type=button value="frame2" onclick="hello('2')">
<input type=button value="frame3" onclick="hello('3')">
**********************
Cheers :)
vinod
__________________
Cheers :)
vinod
|