View Full Version : getting the text/code from another window...

06-07-2004, 10:53 AM
As far as I can remember there are two function that return the text/code of a pointed window.

something like

HTML_text = someWindow.getTextWithTags();
non_HTML_text = someWindow.getTextWithNoTags();

and you get something like:

HTML_text == "<html><title>the page </title>...</html>"

non_HTML_text == "unstructured text.... no tags"

Does someone knows what are the name of those two functions and how did they "work" ?

thank you very much

06-07-2004, 11:27 AM
innerHTML and innerText

But take note that innerText only works in IE.

For example you have these tags:

<div id="blah">
<a href="#">Test</a>
<script type="text/javascript">
alert(document.getElementById('blah').innerHTML); //displays Test with tags
alert(document.getElementById('blah').innerText); //displays Test

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum