IE6 JS setting colspan setAttribute not being honored

C

Craig Taylor

I've seen other referances to this bug in IE when researching the
problem but haven't seen any solutions. Apparently IE does not honor
setAttribute of colspan when building a table.

Does anyone know of a workaround other than manually padding with empty
cells?

eg:

tdElem.setAttribute( "colspan", "3" );

Thanks,

- Craig Taylor
http://www.ctalkobt.net
 
A

augustus kling

Try writing as "colSpan" not "colspan". Another way is using
tdElem.colSpan.
Keep in mind that IE needs <tbody> after <table>, if IE creates his own
<tbody> append to it instead of creating an own <tbody>.

Greetings
 
C

Craig Taylor

augustus said:
Try writing as "colSpan" not "colspan". Another way is using
tdElem.colSpan.
Keep in mind that IE needs <tbody> after <table>, if IE creates his own
<tbody> append to it instead of creating an own <tbody>.

Greetings

That did it.

I am putting the tbody & thead in the table but can't use the .colSpan
directly as I'm updating the table based upon results coming back from
a JSON array.

Thanks!

- Craig Taylor
http://www.ctalkobt.net
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top