I've done some searching around the post, and I have found quite a bit of information related to the setAttribute and it's related uses. My problem lies in the usage of colspanning in dynamic table creation.
Code Snippet
Expand|Select|Wrap|Line Numbers
- <SCRIPT LANGUAGE="JavaScript">
- function morecase(id){
- var tbody = document.getElementById(id).getElementsByTagName("TBODY")[0];
- var row1=document.createElement('TR');
- var row1td1=document.createElement('TD');
- row1td1.appendChild(document.createTextNode('Incident: '));
- var row1td2=document.createElement('TD');
- row1td2.appendChild(document.createElement('INPUT'));
- row1td2.setAttribute('TYPE','text','NAME','incident');
- var row2=document.createElement('TR');
- var row2td1=document.createElement('TD');
- row2td1.appendChild(document.createTextNode('Blah blah blah blah blah blah blah'));
- row2td1.setAttribute('colspan','2');
- row1.appendChild(row1td1);
- row1.appendChild(row1td2);
- row2.appendChild(row2td1);
- tbody.appendChild(row1);
- tbody.appendChild(row2);
- }
- </script>
I can pass other commands to the TD (width, bgcolor, etc.) and they work fine, COLSPAN is just my headache.
Any help would be greatly appreciated!
William
POST NUMBER 1 Woo! :rolleyes: