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. Advertisements

  2. Brett

    Randy Webb Guest

    <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;
    }

    Not if its from a different domain unless your page is locally run.
    If you don't want to display it, why are you downloading it?
    Actually, I have.
    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 Webb, May 29, 2005
    #2
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.