View data in the datatable in the Frontend

View data in the datatable in the Frontend

Learn2excelLearn2excel Posts: 33Questions: 5Answers: 1

Hi All,

I am quite new to development.

Test case URL: https://live.datatables.net/katixaza/1/edit

I have created a webservice that has WebMethods to fetch data from SQL db. Now I would like to retrieve this data using ajax function inside JavaScript and display it in a datatable in the frontend. when I try to run the file, I could just see the column headers but no values below in the table (as you can see in the Output) and also I get a 501 error in the browser console. I've provided test case URL for reference. Hope I get an answer. The webservice file seems to work though when I run it as I could see the values in the tree diagram.

Thank you

Replies

  • kthorngrenkthorngren Posts: 21,336Questions: 26Answers: 4,951

    The 501 error. See this doc explaining the error. This isn't a client side error. You will need to refer to the documentation for the webservice you are setting up to learn how to configure it to support ajax. Possibly you can find help on Stack Overflow or other forum for the webservice.

    Kevin

  • Learn2excelLearn2excel Posts: 33Questions: 5Answers: 1

    Hi Kevin,

    Thanks for your response.

    A correction it was a 500 error not 501, my mistake. The error message reads as below:
    "Failed to load resource: the server responded with a status of 500 ()"

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin

    For a 500 error it simply means "Internal server error". It could be literally anything, from permissions to libraries. You'd need to check your server's error logs to see what is going wrong.

    Allan

Sign In or Register to comment.