469,632 Members | 1,590 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,632 developers. It's quick & easy.

Reading Webpages using javascript

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

Jul 23 '05 #1
1 1425
Brett wrote:
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

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Jul 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by dow | last post: by
5 posts views Thread by Michael Landberg | last post: by
12 posts views Thread by scsharma | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.