Really basic question
I have a function that inserts a new row into a table with different cells. Cell one(or 0) is my delete function to delete that row.

Code:
var cell1 = row.insertCell(0);
cell1.style.textAlign = 'left';
cell1.innerHTML = "<a onClick=\"deleteRow('dataTable', this.parentNode.parentNode.rowIndex)\" align=\"left\"> Remove this Guest</a>";
This calls my delete function

Code:
  function deleteRow(tableID, row) {
            try {
            var table = document.getElementById(tableID);
            var rowCount = table.rows.length;
            table.deleteRow(row);
            }catch(e) {
                alert(e);
            }
In my statement where I declare my "onClick" how can I pass a variable into my function call instead of "dataTable"?
I've tried a few different ways, but I cant seem to get it to work.