Quantcast
Channel: DataTables 1.9 — DataTables forums
Viewing all articles
Browse latest Browse all 1816

How to Hit a URL to pull out the json data and to display the data on DataTable using ajax calls.

$
0
0
Hello Everyone,

This URL('http://xxx.xxx.xxx:8088/test/validGetMyApplications.json'; , got from a different server ) is having my JSON object, i'm trying to hit this URL and trying to pull the json data from this URL to display this data in Jquery Datatable.
but, when i'm trying with this following code it is not hitting the URL. Is anyone can suggest me something to resolve this issue please. Your suggestions will be very helpful. Thanks.

<script type="text/javascript">
$(document).ready(function() {
$('#myapplicationstable').dataTable();
$.ajax({
url: 'http://xxx.xxx.xxx:8088/test/validGetMyApplications.json',
async: false,
dataType: 'json',
success: function (data) {
$.each(data.applicationMainList, function(key, item) {
$('#myapplicationstable').dataTable().fnAddData( [
item.motsId,
item.prismAppLink.linkName,
item.applicationIdName.applicationName,
item.appAcronym,
item.applicationOwner.name
]
);
});
}
});

} );
</script>

Viewing all articles
Browse latest Browse all 1816

Trending Articles