I am trying to create a small website for weather forecasting. When sending a request to accuWeather to get JSON, I cannot get a response. I have checked the request a few times, and it works normally. Could someone point out what wrong in my code so I can fix it? In addition, If you answer, Can you use Javascript instead of using JQuery Link:
This is my project for studying javascript. apiKey is public also.
<html>
<head>
<meta charset="utf-8"/>
<title>getting</title>
<script>
function start(){
//console.log("asdasd");
var requestURL = "http://dataservice.accuweather.com/locations/v1/cities/search?apikey=BfZGgoA9OaaSy7oyAReezmDFngUe2Lek&q=Annandale&language=en-us&details=true" ;
var request = new XMLHttpRequest();
console.log(request);
request.open('GET', requestURL);
//console.log(request.response);
}
window.addEventListener("load",start,false);
</script>
</head>
<body>
<div id="loading"></div>
</body>
</html>
I will appreciate any help.