Reading Webpages using javascript

B

Brett

I am writing a program that will allow a user to enter a webpage
address into a form.
Then it will download and display the webpage below the current one.

example
----------------------------------------------------
| _____________ |
| _____________enter web address | Load Button | |
| -------------- |
|___________________________________________________
| |
| |
| web page will be displayed here |
| |
|__________________________________________________|


Is there a way to download another web page using javascript and read
through it.
I am not too concerned with displaying the web page just downloading
it. Has anyone done anything like this? the closest I have found was a
procedure used by grease monkey "GM_xmlhtt" which is what I am looking
for.

Thanks in advance
Brett
 
R

Randy Webb

Brett said:
I am writing a program that will allow a user to enter a webpage
address into a form.
Then it will download and display the webpage below the current one.

example
----------------------------------------------------
| _____________ |
| _____________enter web address | Load Button | |
| -------------- |
|___________________________________________________
| |
| |
| web page will be displayed here |
| |
|__________________________________________________|

<form name="myForm">
<input type="text" name="URLToAccess">
<input type="button" value="Load Button" onclick="goToURL()">
</form>

<iframe name="myIframe"></iframe>

function goToURL(){
document.frames['myIframe'].src=document.myForm.URLToAccess;
}

Is there a way to download another web page using javascript and read
through it.

Not if its from a different domain unless your page is locally run.
I am not too concerned with displaying the web page just downloading
it.

If you don't want to display it, why are you downloading it?
Has anyone done anything like this?

Actually, I have.
the closest I have found was a procedure used by grease monkey "GM_xmlhtt"
which is what I am looking for.

Without seeing the function GM_xmlhtt, I would guess its just GM's name
for an XMLHTTPRequest function.

http://jibbering.com/2002/4/httprequest.html
 

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

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top