Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Jun 2002
    Posts
    24
    Thanks
    0
    Thanked 0 Times in 0 Posts

    getting the text/code from another window...

    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

  • #2
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,075
    Thanks
    0
    Thanked 256 Times in 252 Posts
    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>
    </div>
    <script type="text/javascript">
    alert(document.getElementById('blah').innerHTML); //displays Test with tags
    alert(document.getElementById('blah').innerText); //displays Test
    </script>
    Glenn
    ____________________________________

    My Blog
    Tower of Hanoi Android app (FREE!)
    Tower of Hanoi Leaderboard
    Samegame Facebook App
    vBulletin Plugins
    ____________________________________


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •