Hello i've been trying to set the rowspan w/ the code below but it doesnt work. When i try to retrieve the value, it has the value and yet it doesnt display the Table cell according to the way i want it, could anybody please help, thanks <script language="javascript"> function loadForm() { var ot = document.getElementById("listtble"); var tr = ot.insertRow(ot.rows.length); var td = tr.insertCell(0); td.innerHTML = "content"; var td = tr.insertCell(1); td.innerHTML = "content"; tr = ot.insertRow(ot.rows.length); var td = tr.insertCell(0); td.setAttribute("colspan",2); // something is wrong with this line td.innerHTML = "content"; } </script> HTML:
just a WILD guess, but try putting the 2 in quotes. Shot in the dark. Otherwise, if you've already got it to work, could you let me know how?
whew ... i thought this one is a lost case .. haha finally worked btw .. the code above works fine in firefox but not in IE ... the only solution was case sensitivity i used ... colSpan instead of colspan mannnnn why cant these browser just follow one standard format
Because IE grew up at a time when there was no standard format for these things, and it's rested on its "laurels" ever since. Attribute values are always strings, that's why quotes are required. - P