H
Hal Burgiss
Hi, and help for a novice trying to get some data dynamically into
tables. I did a small proof of concept page which works fine in IE6 and
Mozilla. Using code such as this:
tbody = document.getElementById('tb');
thead = document.getElementById('header');
tr = thead.insertRow(-1);
td = document.createElement('th');
tr.appendChild(td);
/* start building data here */
[...]
All is well. I paste essentially the same code with subsequent
modifications below this point into a more complex page and it breaks on
IE6 with a 'null is null and not an object' error, regardless of how I
play with it. It breaks at the insertRow statement. I've tried going to
createElement in lieu of insertRow and it breaks in exactly the same
place. No matter what I change. I've tried inserting into the table
itself, thead, and tbody. All get a null object. And yet the original
page works fine, with nearly identical code! Ouch, my brain hurts.
The test pages are:
http://burgiss.net/work/table.html (works fine)
http://burgiss.net/work/pricelist.html (breaks)
Any help is appreciated.
tables. I did a small proof of concept page which works fine in IE6 and
Mozilla. Using code such as this:
tbody = document.getElementById('tb');
thead = document.getElementById('header');
tr = thead.insertRow(-1);
td = document.createElement('th');
tr.appendChild(td);
/* start building data here */
[...]
All is well. I paste essentially the same code with subsequent
modifications below this point into a more complex page and it breaks on
IE6 with a 'null is null and not an object' error, regardless of how I
play with it. It breaks at the insertRow statement. I've tried going to
createElement in lieu of insertRow and it breaks in exactly the same
place. No matter what I change. I've tried inserting into the table
itself, thead, and tbody. All get a null object. And yet the original
page works fine, with nearly identical code! Ouch, my brain hurts.
The test pages are:
http://burgiss.net/work/table.html (works fine)
http://burgiss.net/work/pricelist.html (breaks)
Any help is appreciated.