Reading Webpages using javascript

Discussion in 'Javascript' started by Brett, May 29, 2005.

  1. Brett

    Brett Guest

    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
     
    Brett, May 29, 2005
    #1
    1. Advertising

  2. Brett

    Randy Webb Guest

    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
     
    Randy Webb, May 29, 2005
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. James Yong
    Replies:
    0
    Views:
    325
    James Yong
    Aug 23, 2005
  2. Penang
    Replies:
    3
    Views:
    2,536
    Penang
    Jun 26, 2003
  3. SmilingPolitely

    Webpages and JavaScript

    SmilingPolitely, Oct 24, 2005, in forum: HTML
    Replies:
    4
    Views:
    407
    Travis Newbury
    Oct 24, 2005
  4. John Ortt
    Replies:
    0
    Views:
    132
    John Ortt
    Nov 25, 2004
  5. John Ortt
    Replies:
    3
    Views:
    143
    Michael Winter
    Nov 30, 2004
Loading...

Share This Page