The reason you're not seeing any alert messages is that your function isn't being called. You've registered a script to call a global function called
makeRequest
, but that function is actually defined inside another (anonymous) function, and is not available outside of that context.
You're already loading jQuery, so try using
the built-in AJAX methods[
^]:
function makeRequest(url){
$.get(url)
.done(function(data){ alert(data); })
.fail(function(){ alert('There was a problem with the request.'); });
}