jquery datatables Ajax-Error / http://datatables.net/tn/7

前端 未结 2 1750
南旧
南旧 2021-02-07 23:36

Please look at my problem below:

I use in my MVC-Web-Applikation the jquery datatables. When i display only 8 columns, everything works fine. But with 1 more column, i g

2条回答
  •  心在旅途
    2021-02-08 00:17

    I have it, my friends!!!!!!!!!!!!!!!!!!!!!!! Very NICE :-)

    Here is the Solution:

    $(document).ready(function() {
        $('#example').dataTable( {
            "processing": true,
            "serverSide": true,
            "ajax": {
                "url": "scripts/post.php",
                "type": "POST"
            },
            "columns": [
                { "data": "first_name" },
                { "data": "last_name" },
                { "data": "position" },
                { "data": "office" },
                { "data": "start_date" },
                { "data": "salary" }
            ]
        } );
    } );
    

    I had just to edit the "ajax". When you use the "type" "POST", then it works.

    Thank you very much.

    Greetz Vegeta_77

提交回复
热议问题