ok, lets say my main page "testingiframe. html" has this code in it:
<html>
<body>
<iframe id="frame" src="testingsec ondframe.html">
</body>
</html>
and inside "testingsecondf rame.html" has this code in it:
<html>
<body>
<table>
<tr><td>go go go go go</td></tr>
<tr><td><ifra me id="frame" src="unwanted_p age_lol.html"></td></tr>
</table>
</body>
</html>
how would I remove that iframe...
i tried this:
<script type="text/javascript">
var x = document.getEle mentById("frame ").contentDocum ent;
x.getElementsBy TagName("iframe ")[0].parentNode.rem oveChild(x);
</script>
and:
<script type="text/javascript">
var x = document.getEle mentById("frame ").contentDocum ent;
x.getElementsBy TagName("iframe ")[0].src = "nopage.htm l";
</script>
and even to see if it was even getting the array:
<script type="text/javascript">
var x = document.getEle mentById("frame ").contentDocum ent;
alert(x.getElem entsByTagName(" iframe").length );
</script>
but all of those attempts didn't do much, I am so frustrated its unbelievable. If anybody could help me, it'd be greatly appreciated. Thanks guys.
<html>
<body>
<iframe id="frame" src="testingsec ondframe.html">
</body>
</html>
and inside "testingsecondf rame.html" has this code in it:
<html>
<body>
<table>
<tr><td>go go go go go</td></tr>
<tr><td><ifra me id="frame" src="unwanted_p age_lol.html"></td></tr>
</table>
</body>
</html>
how would I remove that iframe...
i tried this:
<script type="text/javascript">
var x = document.getEle mentById("frame ").contentDocum ent;
x.getElementsBy TagName("iframe ")[0].parentNode.rem oveChild(x);
</script>
and:
<script type="text/javascript">
var x = document.getEle mentById("frame ").contentDocum ent;
x.getElementsBy TagName("iframe ")[0].src = "nopage.htm l";
</script>
and even to see if it was even getting the array:
<script type="text/javascript">
var x = document.getEle mentById("frame ").contentDocum ent;
alert(x.getElem entsByTagName(" iframe").length );
</script>
but all of those attempts didn't do much, I am so frustrated its unbelievable. If anybody could help me, it'd be greatly appreciated. Thanks guys.
Comment