What I've got:
1) a page with a "window.open('some_html', ...)"
2) "some_html" with basically this:
<body onload="document.body.innerHTML=FillIt('some_id')" ></body>
3) a script:
function FillIt(my_id) {
var inner = window.opener.document.getElementById(my_id).clone Node(true);
var a = document.createElement('a');
a.setAttribute('title', 'Close this window');
a.setAttribute('href', 'javascript:self.close()');
var img = document.createElement('img');
img.setAttribute('src', 'some_image');
img.setAttribute('alt', 'pop_down');
a.appendChild(img);
inner.replaceChild(a, inner.getElementById('popup'));
return inner.innerHTML;
}
This won't work. For sure I am doing something dumb in here (I'm a
newbie) but I think "innerHTML" just won't work with "replaceChild".
Please note there's only one 'popup' ID in my original DOM tree (it's
a table) and no, I'd not like to iterate on all the table elements just
to put it together in the end ...
Looking for some advise.
Thanks,
--
Michal Kurowski
<mk**@poczta.gazeta.pl>