F
Flyzone
Hi,
i have a child window (windows.open) and and a parent table create by
dom.
Running these lines from child window:
var myTd7=window.opener.parent.document.createElement('td');
myTd7.setAttribute("class","adminfield");
var myTd7a=window.opener.parent.document.createElement('a');
myTd7a.setAttribute("href","javascript:void(0)");
myTd7a.setAttribute("onclick","javascript:deleteRow(this)");
var myTd7img=window.opener.parent.document.createElement('img');
myTd7img.setAttribute("alt","Delete");
myTd7img.setAttribute("border","0");
myTd7img.setAttribute("src","img/delete.png");
to add a new td with a img. Clicking on the img will be run deleteRow
function that is write on the parent window:
function deleteRow(r) {
var i=r.parentNode.parentNode.rowIndex;
document.getElementById('db_list').deleteRow(i);
}
Problem: in FF all ok, in IE simply the onclick is not working, no
error, like if is not called. Looking with the IE Developper Toolbar
the onclick attribute is set. Trying an if
(window.addEventListener)...does not solve.
Where have I wrong?
Thanks in advance
i have a child window (windows.open) and and a parent table create by
dom.
Running these lines from child window:
var myTd7=window.opener.parent.document.createElement('td');
myTd7.setAttribute("class","adminfield");
var myTd7a=window.opener.parent.document.createElement('a');
myTd7a.setAttribute("href","javascript:void(0)");
myTd7a.setAttribute("onclick","javascript:deleteRow(this)");
var myTd7img=window.opener.parent.document.createElement('img');
myTd7img.setAttribute("alt","Delete");
myTd7img.setAttribute("border","0");
myTd7img.setAttribute("src","img/delete.png");
to add a new td with a img. Clicking on the img will be run deleteRow
function that is write on the parent window:
function deleteRow(r) {
var i=r.parentNode.parentNode.rowIndex;
document.getElementById('db_list').deleteRow(i);
}
Problem: in FF all ok, in IE simply the onclick is not working, no
error, like if is not called. Looking with the IE Developper Toolbar
the onclick attribute is set. Trying an if
(window.addEventListener)...does not solve.
Where have I wrong?
Thanks in advance