When sending a GET request to a server why is www.codecademy.com working as the url but not other url's such as www.google.com?
I have a button on my page that when I press sends a get request. The code below works, but why can't I just substitute it for any other url and get some data back? Just want to work on sending GET requests and parsing the data.
$(document).ready(function(){
$("button").click(function(){
$.get("http://www.codecademy.com/",function(data,status){
alert("Data: " + data + "\nStatus: " + status);
});
});
});