Topeka
Junior Member
Posts: 94
Topeka said 0 great things
|
Post by Topeka on Apr 2, 2010 10:37:23 GMT -8
for this.. why do i keep getting an object required error for line 2? By my board, im looping though tables, finding one that has the width of 100%, border of 0, and a table.tbody.tr.td.font.className of titletext. This should give me the main table on the first Page... BUT, im getting that error on this line, and idk why. If i take out the brdtbl[v].firstChild.firstChild.firstChild.firstChild.className.match(/titletext/i) it works(well it goes to the next error, that looks to be the same problem). So... im guessing the error is comming from that. but Idk what im doing wrong. for (brdtbl=document.getElementsByTagName('table'), v=0; v<brdtbl.length; v++) { if (brdtbl[v].width=="100%" && brdtbl[v].border=="0" && brdtbl[v].firstChild.firstChild.firstChild.firstChild.className.match(/titletext/i)) {
topekat3.proboards.com/index.cgiif you could help that would be great.
|
|
|
Post by Wormopolis on Apr 3, 2010 11:27:18 GMT -8
check for existance first
before you check for classname, add:
&& brdtbl[v].firstChild.firstChild.firstChild.firstChild
then if the font element isnt there, it skips it. its probably finding a table that fits the other stuff, but doesnt have the font element.
|
|
Topeka
Junior Member
Posts: 94
Topeka said 0 great things
|
Post by Topeka on Apr 3, 2010 18:26:16 GMT -8
Ah. that makes sence. and doing that seemed to fix it. Thanks a bunch!
|
|