Code Search for Developers
 
 
  

table_edit.html from AlphaMail at Krugle


Show table_edit.html syntax highlighted

<html>
<body>
<script language = javascript>
function addRowToTable()
{
var tbl = document.getElementById('tblSample');
var lastRow = tbl.rows.length;
// if there's no header row in the table, then iteration = lastRow + 1
var iteration = lastRow;
var row = tbl.insertRow(lastRow);

// left cell
var cellLeft = row.insertCell(0);
var textNode = document.createTextNode(iteration);
cellLeft.appendChild(textNode);

// right cell
var cellRight = row.insertCell(1);
var el = document.createElement('input');
el.setAttribute('type', 'text');
el.setAttribute('name', 'txtRow' + iteration);
el.setAttribute('size', '40');
cellRight.appendChild(el);
}

function removeRowFromTable()
{
var tbl = document.getElementById('tblSample');
var lastRow = tbl.rows.length;
if (lastRow > 2) tbl.deleteRow(2);
}

</script>

<form action="tableaddrow_nw.html" method="get">

<input type="button" value="Add" onclick="addRowToTable();" />
<input type="button" value="Remove" onclick="removeRowFromTable();" />

<table border="1" style="table-layout: fixed; width: 100%;" id="tblSample">
<tr>
<td style="width: 100px;">1</td>
<td style="overflow: hidden;"><DIV style="display:block; width:1000px;">This is some texThis is some texThis is some texThis is some texThis is some texThis is some text</DIV></td>
<td style="width: 100px; background:gray;">1/1/2005</td>
</tr>
</table>

</form>
</body>
</html>




See more files for this project here

AlphaMail

AlphaMail is an accelerated web mail interface with a C++ middleware layer that is more effective than an IMAP proxy which is a highly scalable (10k+ users). The interface includes modern features, Section 508 compliance, and universal browser support.

Project homepage: http://sourceforge.net/projects/alphamail
Programming language(s): C++,Java,JavaScript,Perl
License: other

  data1.html
  data2.html
  droptarget.js
  droptarget_test.html
  field_completion.html
  server_command.html
  table_edit.html
  test.html
  transparentpixel.gif
  wz_dragdrop.js
  wz_dragdrop.zip
  wz_tooltip.js
  wz_tooltip.zip