Jump to content

GuardianZ

Members
  • Posts

    3
  • Joined

  • Last visited

GuardianZ's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. I have managed to add a row and TD successfully, but when i click "View source" the new row is not reflected in the source code.
  2. this is the javascript function I used: function insertrow() { var x=document.getElementById("maintable").insertRow(2); x.bgColor="#C0C9D4"; x.innerHTML="<td class='ns'><input type='button' onclick='insertrow()' value='+'/></td> \ <td>1</td> \ <td class='act'><textarea wrap='virtual' cols=28 rows=1 onchange='checksize(this)' onKeyUp='inc_lines(this)' name='act' type='text' id='text1'></textarea></td> \ <td class='in'><textarea wrap='virtual' cols=28 rows=1 onchange='checksize(this)'onKeyUp='inc_lines(this)' name='in' id='inp'></textarea></td> \ <td class='ex'><textarea wrap='virtual' cols=28 rows=1 onchange='checksizethis)'onKeyUp='inc_lines(this)' name='ex'id='er'></textarea></td> \ <td><input type='checkbox' /></td> \ <td><input id='fail' type='checkbox' onMouseUp='alertId2()'/></td> \ <td><input type='checkbox' /></td> \ <td class='com'><textarea wrap='virtual' cols=28 rows=1 onchange='checksize(this)'onKeyUp='inc_lines(this)' id='com' ></textarea></td> \ <td class='bi'><textarea wrap='virtual' cols=28 rows=1 onchange='checksize(this)'onKeyUp='inc_lines(this)' name='bugid' id ='bi'></textarea></td></tr>"; } it is called with <td class="ns"><form><input type="button" onclick="insertrow()" value="+"/></form></td>
  3. I have written some code to insert a row to a table, but how do i:1) set the class="classname" for the <tr> for the new row 2) after the button is clicked to insert a new row I want the html to be updated to reflect the new row(s)..
×
×
  • Create New...