.get question
.get question
I am new to jQuery and trying to test out the google weather api. From what I read, I can do .get to contact an URL and server would response with xml. I know the call back is executed becasue I can see my log in firebug. However, both data and status are undef. Why is that? Shouldn't data has the response from the server?
-
function show_weather (data, status) {
console.log("hi");
// do something with the xhttp response
}
function get_weather () {
var url = 'http://www.google.com/ig/api?weather=94303';
$("#weather").get(url, {}, show_weather(), "xml"
}
<div id="weather"></div>
Thanks,
R