(Please tell me if this is silly or I am barking up the wrong tree)
Can someone check this please on pre W3C DOM browsers :-
function getDocumentRoot ()
{
for ( e in document.childN odes)
if ( document.childN odes[e].nodeName == "HTML")
return document.childN odes[e];
return document.body;
}
if (!document.docu mentElement)
document.docume ntElement = getDocumentRoot ();
There's an html test page here :-
There's also a test for document.getEle mentById() emulation here :-
Many thanks in advance,
Aaron
Comment