retrieving HTML text

D

Don S

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
 
T

Thomas 'PointedEars' Lahn

Don said:
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.


You should not use this buggy Web interface; get yourself a proper
newsreader and newsserver account instead.


PointedEars
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
474,137
Messages
2,570,794
Members
47,342
Latest member
eixataze

Latest Threads

Top