wrote on 01 dec 2006 in comp.lang.javascript
:
Quote:
Apologies for the almost duplicate post but thought this was much
clearer description of the issue than what I originally posted.
>
I'm trying to do simple integration with a third-party
web application. The app has an 'Action' button on all pages that
can be associate with a JS function. Our application is very
proficient
at parsing text provided it is in some reasonably standard structure.
>
Is what we are trying to do is have a JS function that can be called
from
any page in their system that will provide a reasonable representation
of the text on the screen. I need something close to
document.body.innerText; the problem with this function is that it
strips spacing from tables so we can't get consistent layout.
>
The consistent layout I am looking for would be the same as if you did
the following on any page:
1) Select all
2) Copy
3) Paste to notepad
>
Is there a function or process that will retrieve all text and retain
formatting?
..innerHTML
and then paste it into a new <div>
[.innerText is IE only, it seems]
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)