Tuesday, February 23, 2010

Tip: Browser rowspan vs rowSpan when using JavaScript

It's weird that IE7 is case sensitive towards the 'rowspan' property of a table cell. We have to use 'rowSpan' so that IE7 can recognize it and run web page properly. I have tried both the names using FireFox, it was working fine without problem.

For example, this wont work in IE:
table1.cells[0].rowspan = 3;
This will work in IE:
table1.cells[0].rowSpan = 3;

No comments: