Correct. This function has changed substantially in the last three days
and is now working perfectly.
Pete
-----Original Message-----
From: Teng-Fong SEAK [mailto:tfseak@F...]
Sent: Friday, November 22, 2002 6:49 AM
To: javascript
Subject: [javascript] Re: How to get table row addressibility
I think you both meant getElementsByName or getElementById instead of
getElementsByTagName, right? Because logically, your tag name is
"table"
instead of "payees" for this to work, but this isn't what you want.
> -----Message d'origine-----
> De : Peter N. Kipe [mailto:pkipe@c...]
> Envoy=C3=A9 : mardi 19 novembre 2002 20:36
> =C3=80 : javascript
> Objet : [javascript] Re: How to get table row addressibility
>
>
> Joe,
>
> IE6 didn't like oTable.rows.length, so I hard coded a number
> of rows. Also,
> I changed "getElementByTagName" to getElementsByTagName" --
> plural Elements.
> I assume it was just a typo.
>
> But when I run the script,
>
> function ApplyPending()
> {var oTable =3D document.getElementsByTagName("Payees");
> for (var i =3D 0; i < 5; i++)
> {if (oTable.rows[i].cells[1].innerHTML =3D=3D "Pending")
> {oTable.rows[i].cells[1].innerHTML =3D "";}
> }
> }
> //-->
>
> I get the message Error: 'rows' is null or not an object.
>
> Any ideas?