The table stopped requesting data from the server

The table stopped requesting data from the server

izumovizumov Posts: 178Questions: 14Answers: 0

my test case i http://montaj.vianor-konakovo.ru/goods.html file gooods101.js
After trying to implement user data transfer to the server, the table stopped requesting data from the server. Tell me what my error code in the file goods101.js. How to fix the code to make the program work correctly ?

Replies

  • sandysandy Posts: 913Questions: 0Answers: 236

    Hi izumov,

    If you take a look at the console in your browser you will see the error. If you move line 66 (});) to line 58 then it should work fine. It's throwing an error because you are trying to run javascript inside the DataTables configuration Object.

    Thanks,

    Sandy

  • izumovizumov Posts: 178Questions: 14Answers: 0

    thanks for the tip.followed your advice and changed the code one error disappeared another appeared in line 171.Tell me what the error is.

  • izumovizumov Posts: 178Questions: 14Answers: 0

    corrected the code now and there are no errors but also request of the table to the server is not present. I can't figure it out.

  • sandysandy Posts: 913Questions: 0Answers: 236
    edited August 2019

    Hi izumov,

    You are doing your DataTables initialisation outside of the $(document).ready() function. Your table isn't in the html at this point, you need to wait for the $(document).ready(). Here is some more info.

    Hope this helps,

    Sandy

  • izumovizumov Posts: 178Questions: 14Answers: 0

    corrected the code now and there are no errors everything works as it should. Thank you for your valuable advice with their help, I was able to quickly debug the program

This discussion has been closed.