Howto store a website in a variable?

Y

YoursTruly

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/verwachtingen6479NL.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
 
Y

YoursTruly

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

the following code works:

xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET",
"http://www.meteo.be/nederlands/pages/Verwachtingen/verwachtingen6479NL.html",true);
xmlhttp.onreadystatechange=function() {
if (xmlhttp.readyState==4) { //when complete
alert(xmlhttp.responseText)
}
}
xmlhttp.send(null)

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

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
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top