Howto store a website in a variable?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • YoursTruly

    #1

    Howto store a website in a variable?

    Hello,

    can anyone tell me how i can code the following:

    i want to store certain parsed data in variables. The data comes from a
    specific website. Can this be done with 'open'?

    var load =
    open('http://www.meteo.be/nederlands/pages/Verwachtingen/verwachtingen64 79NL.html','r') ;

    I wanted to write an firefox plugin that can retrieve local weather
    information of my country, like forecastfox does. I looked in the source of
    forecastfox but couldnt find usefull for me...
    tia



  • YoursTruly

    #2
    Re: Howto store a website in a variable?

    > i want to store certain parsed data in variables. The data comes from a[color=blue]
    > specific website. Can this be done with 'open'?[/color]

    the following code works:

    xmlhttp = new XMLHttpRequest( );
    xmlhttp.open("G ET",
    "http://www.meteo.be/nederlands/pages/Verwachtingen/verwachtingen64 79NL.html",true );
    xmlhttp.onready statechange=fun ction() {
    if (xmlhttp.readyS tate==4) { //when complete
    alert(xmlhttp.r esponseText)
    }
    }
    xmlhttp.send(nu ll)

    Is this the best way? Or is there a better way to parse the data out of that
    website?


    Comment

    Working...