tedqn@yahoo.com wrote:
[color=blue]
>This may sound weird but I'm try to find a way to copy the whole
>docoument from one frame to another. It's sort of like stowing away
>the whole page to another frame so that user can use the main frame
>for other things. When done, the user then can pull back the previous
>page into the main frame. I tried the swapping with
>document.body.innerHTML but then it only copied whatever in the body
>but not the header, which contains all the javascript functions and
>css. I thought about just replacing the other frame's url with the
>current but it won't work because the current page contains a "form
>submitted" search & result. Loading its url to the other frame would
>result in a complete new search. Any ideas appreciated.
>
>[/color]
Heya ted,
Try :
if(document.implementation.hasFeature("Core", "2.0")) {
var myHTMLElement = parent.myFrame.document.documentElement;
myHTMLElement =
parent.myOtherFrame.document.importNode(myHTMLElem ent, true);
parent.myOtherFrame.document.replaceChild(myHTMLEl ement,
parent.myOtherFrame.document.documentElement);
}
else {
alert("Can't transfer search results. :(");
}
I've never tried this before so it may need some tweaking. Let me know
if it works.
More Core interfaces can be found here->
http://www.w3.org/TR/2000/REC-DOM-Le...1113/core.html .