Hello, thanks in advance for taking the time to read this.
I’m trying to count how many TD are on a page contained in an iframe, i’ve tried doing something like this:
[quote]
<html>
<head>
<script>
function go()
{
theFrame=document.getElementById(1)
idocument=theFrame.contentDocument
TDcount=idocument.getElementsByTagName(“td”).length
alert(TDcount)
}
</script>
</head>
<body>
<iframe id=1 height=500 width=500 src=”
<input type=’button’ onclick=”go()” value=’test’>
</body>
</html>
Anyways, I know that i’m not using contentDocument properly because it doesn’t work, so I was hoping someone could explain to me how to make this happen. ^_^
Thanks again!