Re: Help needed dynamically accessing table cell values
- From: spambait@xxxxxxxxxx (Doug Miller)
- Date: Wed, 31 Oct 2007 16:13:30 GMT
In article <1193840287.433100.188260@xxxxxxxxxxxxxxxxxxxxxxxxxxx>, "es330td@xxxxxxxxx" <es330td@xxxxxxxxx> wrote:
[...]
function checkvalue(myvar) {
var ary,i;
ary = document.getElementsByTagName("TD")
for(i in ary)
{
alert(i + ' ' + document.getElementById('td1').innerText);
}
}
</script>
When I run this onBlur it will run through the loop and pop up an
alert box with TD1 1/2/2007 and then one with TD2 3/14/2007. As a
result I know that the ary = assignment is working.
However, if I try to substitute i for the 'td1' in the getElementById
property it tells me Object Required. What is the right way to do
this?
Have you tried getElementById('td' + i) ?
--
Regards,
Doug Miller (alphageek at milmac dot com)
It's time to throw all their damned tea in the harbor again.
.
- References:
- Help needed dynamically accessing table cell values
- From: es330td@xxxxxxxxx
- Help needed dynamically accessing table cell values
- Prev by Date: Re: JScript equivalent of getElementById
- Next by Date: Re: Javascript Library
- Previous by thread: Re: Help needed dynamically accessing table cell values
- Next by thread: How to trap onclick event handler amidst onmouseleave, onmouseover, and onmouseout
- Index(es):
Relevant Pages
|