On Jul 2, 6:47 pm, Jorge <jo...@jorgecha morro.comwrote:
Forget that. There's no need to move things around :
document.body.s tyle.visibility = "none";
(document.getEl ementById('cent erPage')).style .visibility= "visible";
--Jorge.
No, because if the enclosing tag is hidden, all contained tags are
hidden as well.
>
I think you need to do something like this : :
>
var hiddenDiv, visibleDiv, e;
>
visibleDiv = document.getEle mentById('cente rPage');
(hiddenDiv= document.create Element('div')) .style.display= "none";
>
//Move all the body's elements to the hiddenDiv:
while (e= document.body.f irstChild) {
hiddenDiv.appen dChild(e);
>
}
>
//Now the body is empty.
//Insert centerPage into the body
document.body.a ppendChild(visi bleDiv);
//Insert the hiddenDiv into the body.
document.body.a ppendChild(hidd enDiv);
>
hidden as well.
>
I think you need to do something like this : :
>
var hiddenDiv, visibleDiv, e;
>
visibleDiv = document.getEle mentById('cente rPage');
(hiddenDiv= document.create Element('div')) .style.display= "none";
>
//Move all the body's elements to the hiddenDiv:
while (e= document.body.f irstChild) {
hiddenDiv.appen dChild(e);
>
}
>
//Now the body is empty.
//Insert centerPage into the body
document.body.a ppendChild(visi bleDiv);
//Insert the hiddenDiv into the body.
document.body.a ppendChild(hidd enDiv);
>
document.body.s tyle.visibility = "none";
(document.getEl ementById('cent erPage')).style .visibility= "visible";
--Jorge.
Comment