Hi there.
Iam facing a very strange problem.
starting with the code:
<html>
<script language = 'javascript'>
function init(){
var x = window.document.getElementById("z");
var temp = x.getElementsByTagName("a");
x.removeChild(temp[1]);
}
</script>
<body onload = "init();">
<div id = "z">
<div>
<a>ola</a>
<a>oli</a>
<a>ole</a>
</div>
</div>
</body>
<html>
The problem here is that i can't remove any <a> in this case because temp[n] isn't a node and it should be.
Thanks
Iam facing a very strange problem.
starting with the code:
<html>
<script language = 'javascript'>
function init(){
var x = window.document.getElementById("z");
var temp = x.getElementsByTagName("a");
x.removeChild(temp[1]);
}
</script>
<body onload = "init();">
<div id = "z">
<div>
<a>ola</a>
<a>oli</a>
<a>ole</a>
</div>
</div>
</body>
<html>
The problem here is that i can't remove any <a> in this case because temp[n] isn't a node and it should be.
Thanks