I have to populate dynamic table with JSON data, which is given by service URL, I am using Spring+Hibernate, form that I am giving service Service URL, Please check my getData.html file, please check it, It is not working properly. I have taken this example form here
getData.html
<!DOCTYPE html>
<html>
<head>
<!-- <script>
var t=getTypeFromDOm();
$.getJSON(
url:"localhost:8080/HomeServiceProvider/booking/getAllBookingDetails"
data:{
type:t
},
success: operate(){
$("#table_to_display").datatable();
}
)
</script> -->
<script>
$(document).ready(function() {
$('#table_to_display').dataTable( {
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "http://www.service4homes.com:8080/HomeServiceProvider/booking/getAllBookingDetails" // for you it will be - /getWidgetsByType
} );
} );
</script>
</head>
<body>
<div id="table_to_display"></div>
</body>
</html>
My JSON Data
{
custName: "Navin"
custMobile: "8123456789"
custEmail: "[email protected]"
custAddress: "BAngalore"
}
onloadthingy has a strange character in it ?