In article <f5***********@news.isd.dp.ua>, "Dmitry Kulinich" <dk**@isd.dp.uawrites:
>
if (nodes[j].outerHTML.indexOf('IFRAME') == -1){
control = nodes[j].cloneNode(true);
}
else {
control = nodes[j].cloneNode(false);
control.insertAdjacentHTML('afterBegin', nodes[j].innerHTML);
}
<VAXman- @SendSpamHere.ORGwrote in message
news:fr*************@newsfe12.lga...
>>I have been trying to copy a DIV in an IFRAME to the TOP DOCUMENT.
The code does the following
iframeDIV = document.getElementById('div_in_iframe');
var clonedDIV = iframeDIV.cloneNode(true);
It then sets various attributes of clonedDIV.
The last thing it does is:
top.document.body.appendChild(clonedDIV);
This works in FF and Safari but it fails in IE. IE doesn't seem to
like the last statement. Why?
Could you explain this code you've provided and how I would insert it
in place of the top.document.body.appendChild(clonedDIV); in my code.
BTW, I found that using parent instead of top made M$IE happier. I no
longer get M$IE coughing up an error on the
parent.document.body.appendChild(clonedDIV);
but it still doesn't display the clonedDIV.
--
VAXman- A Bored Certified VMS Kernel Mode Hacker VAXman(at)TMESIS(dot)COM
"Well my son, life is like a beanstalk, isn't it?"