0

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"
}
2
  • Isn't working, as in it sits at home all day watcing daytime TV? How isn't it working, do you see a table at all ? Commented Jan 24, 2015 at 9:17
  • Should be noted that your onload thingy has a strange character in it ? Commented Jan 24, 2015 at 9:18

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.