retrieving HTML text

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Don S

    retrieving HTML text

    Hi All.

    Is there a way in Javascript to retrieve the HTML text from a webpage,
    without actually opening the web page? For example, specify a web page
    (it's actually the reply to an HTTP GET), and load the HTML from the
    page into a string variable.

    I want to parse out certain data from the source page, and display it on
    another web page. I've done this in VB, but am new to Java.

    Thanks for any ideas.

    Don



    *** Sent via Developersdex http://www.developersdex.com ***
  • Thomas 'PointedEars' Lahn

    #2
    Re: retrieving HTML text

    Don S wrote:
    Is there a way in Javascript to retrieve the HTML text from a webpage,
    without actually opening the web page? For example, specify a web page
    (it's actually the reply to an HTTP GET), and load the HTML from the
    page into a string variable.
    >
    I want to parse out certain data from the source page, and display it on
    another web page.
    Client-side: If the source is on the same domain, use a hidden (i)frame or
    XMLHttpRequest as-is; if not, get authorization from their authors and use
    server-side URL rewrite or a proxy script to fool the DOM into believing it
    is from the same domain.

    Or you can do this server-side only with no but legal boundaries.

    If you don't have authorization to use that foreign content in your site, in
    any case don't do it, ever; you would violate copyright/author's rights and
    could be forced by the author's lawyer to pay a considerable fee for
    avoiding to go to court which would cost you or your customer even more.
    I have seen that before.
    I've done this in VB, but am new to Java.
    Since you are from VB: Java <JavaScript
    *** Sent via Developersdex http://www.developersdex.com ***
    You should not use this buggy Web interface; get yourself a proper
    newsreader and newsserver account instead.


    PointedEars
    --
    Prototype.js was written by people who don't know javascript for people
    who don't know javascript. People who don't know javascript are not
    the best source of advice on designing systems that use javascript.
    -- Richard Cornford, cljs, <f806at$ail$1$8 300dec7@news.de mon.co.uk>

    Comment

    Working...