J
jamescostello
The code below is part of a script that is imported by a webpage. I am
trying to modify a table on that webpage using this code. I can't
modify the actual webpage itself.
I would like to simply delete the last row from the table. After doing
the deleteRow method below, the outerHTML that is displayed in the
alert no longer contains the last row.
However, the actual row is still displayed on the webpage.
if(window.name == 'menuBar')
{
window.attachEvent("onload", navOnLoad);
}
function navOnLoad()
{
if (event.returnValue != false) {
var menuTable = document.getElementById("subnewAct");
var campResRow = document.getElementById("mnu_item_campaignact");
if(menuTable != null && campResRow != null)
{
linkIndex = campResRow.rowIndex;
document.all.subnewAct.deleteRow(linkIndex);
alert(document.all.subnewAct.outerHTML);
}
}
}
trying to modify a table on that webpage using this code. I can't
modify the actual webpage itself.
I would like to simply delete the last row from the table. After doing
the deleteRow method below, the outerHTML that is displayed in the
alert no longer contains the last row.
However, the actual row is still displayed on the webpage.
if(window.name == 'menuBar')
{
window.attachEvent("onload", navOnLoad);
}
function navOnLoad()
{
if (event.returnValue != false) {
var menuTable = document.getElementById("subnewAct");
var campResRow = document.getElementById("mnu_item_campaignact");
if(menuTable != null && campResRow != null)
{
linkIndex = campResRow.rowIndex;
document.all.subnewAct.deleteRow(linkIndex);
alert(document.all.subnewAct.outerHTML);
}
}
}