passing table row to parent window

M

Mariusz

Hi,
I'm trying to add rows to table created in top window. Here is sample code.

function addD()
{
window.setTimeout(addDiv,100);
}
function addDiv()
{
top.document.body.insertAdjacentHTML("afterBegin","

<div id='dnd' style=\"Z-INDEX: 104; FILTER: alpha(opacity=40); LEFT: 488px;
POSITION: absolute; TOP: 160px; \"><table id='dragTable'></table></div>
");
}

AddD is called on onLoad of child page.
Then - when i click on table row i have something like this...

function addContent(id)
{
var fr = document.getElementById(id).cloneNode(true);
top.document.getElementById('dragTable').tBodies[0].appendChild(fr);
}

It looks to me that I cannot pass object from child frame to parent frame.
Is there a way to work around this problem? I tried to pass innerHTML to
parent window, then create in parent window new tr object and set this inner
HTML as it's inner html and then add this but i got problem because when I
add it then first <td> is lost - don't know why.

Anyone have some ideas?


regards
Mariusz
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,996
Messages
2,570,238
Members
46,826
Latest member
robinsontor

Latest Threads

Top