faqts : Computers : Programming : Languages : JavaScript : Tables

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

56 of 83 people (67%) answered Yes
Recently 4 of 10 people (40%) answered Yes

Entry

How do I know which row in a table is selected for deleting?

Apr 14th, 2000 10:16
Martin Honnen, Kady Ny,


Use
  tableElement.deleteRow(rowIndex)
with NN6 and IE4+.
Cross browser function
function deleteRow (tableID, rowIndex) {
  var table = 
    document.all ? document.all[tableID] :
    document.getElementById(tableID);
  table.deleteRow(rowIndex);
}