D
delraydog
I know that innerText is not supported in FireFox and I've found the
following code fragment which was originally designed in an HTMLElement
prototype for an innerText getter. I do not however want to use the
getter approach and want to just get the innerText as follows:
var childS = iframe.contentWindow.document.body.childNodes;
for(var i=0; i<childS.length; i++)
{
if(childS.nodeType==1)
text+= childS.tagName=="BR" ? '\n' : childS.innerText;
else
if(childS.nodeType==3)
text+= childS.nodeValue;
}
Unfortunately, this does not work... iframe is an instance of an object
created as follows: iframe=document.createElement("iframe");
Any suggestions on how to make this work? I think the answer lies in
the declaration of childS but I'm not quite sure.
Cliff.
following code fragment which was originally designed in an HTMLElement
prototype for an innerText getter. I do not however want to use the
getter approach and want to just get the innerText as follows:
var childS = iframe.contentWindow.document.body.childNodes;
for(var i=0; i<childS.length; i++)
{
if(childS.nodeType==1)
text+= childS.tagName=="BR" ? '\n' : childS.innerText;
else
if(childS.nodeType==3)
text+= childS.nodeValue;
}
Unfortunately, this does not work... iframe is an instance of an object
created as follows: iframe=document.createElement("iframe");
Any suggestions on how to make this work? I think the answer lies in
the declaration of childS but I'm not quite sure.
Cliff.