I am trying to pull down an XML doc from a remote server. It's actually the Google weather API. I'm pulling it (as i can see the results in the Chrome js debugger) but I don't know how to get rid of this error that seems to halt all code processing: "missing ; before statement". I think it thinks the result is different than it's expecting. I'm doing this in traditional HTML.
Here is the code I'm using. I found it in a post somewhere...
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title> New Document </title>
<meta name="Generator" content="EditPlus">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script>
<script language="JavaScript">
<!--
$(document).ready(function(){
$('#loadWeather').click(function(){
$.ajax({
type:"GET",
dataType:"jsonp",
url: "http://www.google.com/ig/api?weather=10010",
success: function(jsonp){
$(jsonp).find('forecast_conditions').each(function(){
$("#weatherResult").append($(this).find('day_of_week').attr('data'));
});
}
});
});
});
//-->
</script>
</head>
<body>
<a href="javascript:void(0)" id="loadWeather">Click here</a>
<div id="weatherResult"></div>
</body>
</html>