Hi,
Im creating new row to the table dynamically.
While creating a cell to that row, I dynamically create an anchor element and I set onclick attribute to another function with parameter 'row' object.
I did like this,
function AddRow()
{
.........
var rowCount=tblAttach.rows.length;
var row = tblAttach.insertRow(rowCount);
var cell1 = row.insertCell(0);
var element1 = document.createElement("a");
element1.setAttribute('onclick','javascript:RemoveRow(' + row + ');'); // set onclick attribute with parameter 'row' object
var cell3=row.insertCell(1);
.........
.........
}
function RemoveRow(obj)
{
alert(obj); // Here an error message occur 'runtime error: 'object' is undefined'
}
Can anybody help me to sorted out this problem...
And one more I want to know that, whether the dynamically created html contents can be viewed in 'View Source' code...
Thanks,
Anandh