I'm tying to fetch some data from my database. When i give the path in my browser i can see the content but i want to get the data from by using ajax and store it in a variable.
function getSuccessOutput() {
$.ajax({
url:'/dc/dcrest/dcrs/datacenter/1',
complete: function (response) {
$('#output').html(response.responseText);
},
error: function () {
$('#output').html('Bummer: there was an error!');
},
});
return false;
}