After initiating a table with server processing, there is no Ajax request

After initiating a table with server processing, there is no Ajax request

izumovizumov Posts: 178Questions: 14Answers: 0

the console displays the following text
jquery-3.3.1.min.js:2 Uncaught TypeError: Cannot read property 'mData' of undefined
at HTMLTableCellElement.<anonymous> (dataTables.js:1183)
at Function.each (jquery-3.3.1.min.js:2)
at w.fn.init.each (jquery-3.3.1.min.js:2)
at HTMLTableElement.<anonymous> (dataTables.js:1180)
at Function.each (jquery-3.3.1.min.js:2)
at w.fn.init.each (jquery-3.3.1.min.js:2)
at w.fn.init.DataTable [as dataTable] (dataTables.js:881)
at w.fn.init.$.fn.DataTable (dataTables.js:15135)
at HTMLDocument.<anonymous> (scriptdatatableclients0311.js:4)
at l (jquery-3.3.1.min.js:2)

debugger unload code- iqudel
help to deal with the disability.Tell me what the problem is. How do I solve it

Answers

  • izumovizumov Posts: 178Questions: 14Answers: 0

    debugger code
    iqudel

  • kthorngrenkthorngren Posts: 20,302Questions: 26Answers: 4,769
    edited May 2019

    This usually means there is a mismatch between the Datatables config, the data returned and/or the number of th you have defined. At minimum we will need to see your Datatables init code, an example of the JSON response (using the browser's dev tools) and your HTMl table config. However it would be better if you can link to your page or a test case replicating the issue.
    https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case

    Kevin

  • izumovizumov Posts: 178Questions: 14Answers: 0
    edited May 2019

    Ajax request is not sent accordingly and no response
    Ajax request is not sent accordingly and no response
    Here is the code to create a table in Html Page

    </div>
    <table style="position:absolute;left:16px;top:103px;width:1373px;height:482px;z-index:1;" id="clients">
    <tr>
    <td class="cell0"><span style="color:#000000;font-family:Arial;font-size:13px;line-height:13px;"> код</span></td>
    <td class="cell0"><span style="color:#000000;font-family:Arial;font-size:13px;line-height:16px;"> код<br>1с</span></td>
    <td class="cell1"><span style="color:#000000;font-family:Arial;font-size:13px;line-height:13px;"> логин</span></td>
    <td class="cell2"><span style="color:#000000;font-family:Arial;font-size:13px;line-height:16px;"> пароль</span></td>
    <td class="cell0"><span style="color:#000000;font-family:Arial;font-size:13px;line-height:13px;"> имя</span></td>
    <td class="cell0"><span style="color:#000000;font-family:Arial;font-size:13px;line-height:16px;"> ИНН</span></td>
    <td class="cell3"><span style="color:#000000;font-family:Arial;font-size:13px;line-height:16px;"> наценка<br>% </span></td>
    <td class="cell2"><span style="color:#000000;font-family:Arial;font-size:13px;line-height:16px;"> e-mail</span></td>
    <td class="cell2"><span style="color:#000000;font-family:Arial;font-size:13px;line-height:16px;"> phone</span></td>
    <td class="cell4"><span style="color:#000000;font-family:Arial;font-size:13px;line-height:13px;"> viber</span></td>
    <td class="cell5"><span style="color:#000000;font-family:Arial;font-size:13px;line-height:16px;"> warsup</span></td>
    <td class="cell6"><span style="color:#000000;font-family:Arial;font-size:13px;line-height:13px;"> phone1</span></td>
    <td class="cell7"><span style="color:#000000;font-family:Arial;font-size:13px;line-height:13px;"> область</span></td>
    <td class="cell8"><span style="color:#000000;font-family:Arial;font-size:13px;line-height:13px;"> город</span></td>
    <td class="cell1"><span style="color:#000000;font-family:Arial;font-size:13px;line-height:13px;"> улица</span></td>
    <td class="cell3"><span style="color:#000000;font-family:Arial;font-size:13px;line-height:13px;"> дом</span></td>
    <td class="cell3"><span style="color:#000000;font-family:Arial;font-size:13px;line-height:13px;"> офис</span></td>
    <td class="cell9"><span style="color:#000000;font-family:Arial;font-size:13px;line-height:16px;"> ФИО<br>менеджера</span></td>
    <td class="cell10"><span style="color:#000000;font-family:Arial;font-size:13px;line-height:16px;"> e-mail<br>менеджера</span></td>
    <td class="cell11"><span style="color:#000000;font-family:Arial;font-size:13px;line-height:16px;"> телефон<br>менеджера</span></td>
    <td class="cell9"><span style="color:#000000;font-family:Arial;font-size:13px;line-height:16px;"> запасной<br>телефон<br>менеджера</span></td>
    <td class="cell12"><span style="color:#000000;font-family:Arial;font-size:13px;line-height:13px;"> плохой</span></td>
    <td class="cell3"><span style="color:#000000;font-family:Arial;font-size:13px;line-height:13px;"> ЮЛ</span></td>
    <td class="cell13"><span style="color:#000000;font-family:Arial;font-size:13px;line-height:16px;"> дата регистрации</span></td>
    </tr>
    
    <tr>
    <
    </tr>
    <tr>
    
    <tr>
    
    <tr>
    
    <tr>
    <
    </tr>
    <tr>
    
    </tr>
    <tr>
    
    </tr>
    <tr>
    
    </tr>
    <tr>
    <td class="cell14">&nbsp;</td>
    <td class="cell14">&nbsp;</td>
    <td class="cell15">&nbsp;</td>
    <td class="cell16">&nbsp;</td>
    <td class="cell14">&nbsp;</td>
    <td class="cell14">&nbsp;</td>
    <td class="cell17">&nbsp;</td>
    <td class="cell16">&nbsp;</td>
    <td class="cell16">&nbsp;</td>
    <td class="cell18">&nbsp;</td>
    <td class="cell19">&nbsp;</td>
    <td class="cell20">&nbsp;</td>
    <td class="cell21">&nbsp;</td>
    <td class="cell22">&nbsp;</td>
    <td class="cell15">&nbsp;</td>
    <td class="cell17">&nbsp;</td>
    <td class="cell17">&nbsp;</td>
    <td class="cell23">&nbsp;</td>
    <td class="cell24">&nbsp;</td>
    <td class="cell25">&nbsp;</td>
    <td class="cell23">&nbsp;</td>
    <td class="cell26">&nbsp;</td>
    <td class="cell17">&nbsp;</td>
    <td class="cell27">&nbsp;</td>
    </tr>
    </table>
    

    This is the initiation code

    $(document).ready(function()
    
        {
        $('#clients').DataTable( {
             "order": [[ 0, "desc" ]],
             select: true,
             scrollY: true,
             scrollX:true,
             "sRowSelect": "single",
            "processing": true,
            "bPaginate": true,
            "bSort": true,
            "serverSide": true,
            "autoWidth":true,
            // "ajax": "proc.php"
            "ajax": "server_processingclients011.php"
            //"ajax": "proba9.php"
        } );
    
        } );
        $('#clients tbody').on('dblclick', 'tr', function () {
            var table =$('#clients').DataTable();
            var data = table.row( this ).data();
            document.location.href="http://localhost/client15.html?id="+data[0];
    
        } );
    
    

    EDIT: Updated formatting to place triple ticks (```) on their own lines.

  • kthorngrenkthorngren Posts: 20,302Questions: 26Answers: 4,769

    Thanks for trying to format the code. The triple ticks need to be on their own lines.

    Looks like the problem is that you have defined your header columns with td instead of th. Try changing to th.

    Kevin

  • izumovizumov Posts: 178Questions: 14Answers: 0

    I made the changes you recommended and made the upload.Upload code uyaqiq
    See if anything's changed ?Or is the problem something else

  • izumovizumov Posts: 178Questions: 14Answers: 0

    By changing the Declaration of the table in the Html code, I achieved that the request was sent but the answer comes with an error net::ERR_CONNECTION_RESET
    What could be the reason .How do I resolve the error?

  • kthorngrenkthorngren Posts: 20,302Questions: 26Answers: 4,769

    but the answer comes with an error net::ERR_CONNECTION_RESET

    This would be a networking issue where a device (server, firewall, etc) in the network path is reseting the network connection. You will need to find what device is responding with the reset and troubleshoot it to find out why. This is not due to Datatables.

    Kevin

  • izumovizumov Posts: 178Questions: 14Answers: 0

    both client and server are on the same computer

  • kthorngrenkthorngren Posts: 20,302Questions: 26Answers: 4,769

    Then look at the web server logs to determine why it is reseting the connection. Do you have an HTTP server running?

    Kevin

  • izumovizumov Posts: 178Questions: 14Answers: 0

    I have working table with 9 columns but need to to withdraw 24. Gradually increasing the number of columns I noticed. That error starts to appear when the number exceeds 15 columns. BEFORE this error does not occur. What can you tell me to do to still increase the number of columns to 24. Is that possible?

  • izumovizumov Posts: 178Questions: 14Answers: 0

    And I note that the working table is connected to the processor issuing data on all 24 columns and they successfully come and the table displays the first 9-15 columns. BUT as soon as the column becomes 16 occurs indicated by me earlier, the error net :: ERR_CONNECTION_RESET. What could be the problem? Prompt me

  • tangerinetangerine Posts: 3,350Questions: 37Answers: 394

    Kevin already told you:

    Then look at the web server logs to determine why it is reseting the connection.

  • izumovizumov Posts: 178Questions: 14Answers: 0

    I am interested in such server selectivity,which depends on the number of initiated columns. Although the answer is always based on 24 columns.And that is triggered when меньше16 columns. the code works without errors. And ASM initiated by only the number of columns is 16 acenet to receive an error and do not receive any response

  • izumovizumov Posts: 178Questions: 14Answers: 0

    Suppose that the cause of the error in the web server for this there are good reasons all aJax requests fail. However, there is a strong objection.When I take and copy an Ajax request from the built-in debugger to the browser, the request is executed correctly, which contradicts the assumption about the cause of the error in the web server

  • izumovizumov Posts: 178Questions: 14Answers: 0

    miracles, and only server-side code is reduced to echo 1. and for a table with 14 columns, the Ajax request receives a response of 1. And for a table with 16 columns gets an error net::ERR_CONNECTION_RESET
    how can this be I do not understand

  • kthorngrenkthorngren Posts: 20,302Questions: 26Answers: 4,769

    Have you looked at your web server logs? That is an error coming from the server. Its not a Datatables error. If you want help debugging please post a link to your page or a test case replicating the issue.
    https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case

    Kevin

This discussion has been closed.