Bonjour

J'ai une table "example" qui est initialisé dynamiqument avec un GET lors du chargement de la page à l'initialisation. J'ai rajouté un bouton et une méthode sendAja11() afin de faire un post vers ma servlet apres changement de l'ordre des lignes.
Lorsque je click sur mon bouton cela envoi du null coté serveur ???
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
var editor; // use a global for the submit and return data rendering in the examples
$(document).ready(function() {
    var table = $('#example').DataTable({
        dom: 'Bfrtip',
        "searching": false,
        "paging": false,
        ajax: '/jquery03/MyServlet2',
        columns: [{
            data: 'readingOrder',
            className: 'reorder'
        }, {
            data: 'title'
        }, {
            data: 'author'
        }, {
            data: 'duration',
            render: function(data, type, row) {
                return parseInt(data / 60, 10) + 'h ' + (data % 60) + 'm';
            }
        }],
        columnDefs: [{
            orderable: false,
            targets: [1, 2, 3]
        }],
        rowReorder: {
            dataSrc: 'readingOrder',
            editor: editor
        },
        select: true,
    });
 
    editor
        .on('postCreate postRemove', function() {
            // After create or edit, a number of other rows might have been effected -
            // so we need to reload the table, keeping the paging in the current position
            table.ajax.reload(null, false);
        })
        .on('initCreate', function() {
            // Enable order for create
            editor.field('readingOrder').enable();
        })
        .on('initEdit', function() {
            // Disable for edit (re-ordering is performed by click and drag)
            editor.field('readingOrder').disable();
        });
});
 
sendAja11 = function() {
    var data;
    if ($.fn.dataTable.isDataTable('#example')) {
        data = $('#example').DataTable();
    } else {
        data = $('#example').DataTable({
            paging: false
        });
    }
 
    $.ajax({
        type: 'post',
        cache: false,
        url: '/jquery03/MyServlet2',
        data: function(d) {
            return {
                'd': JSON.stringify(d)
            };
        }
 
    });
}
et le HTML
Code html : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
<table id="example" class="display" cellspacing="0" width="100%">
        <thead>
            <tr>
                <th>Order</th>
                <th>Title</th>
                <th>Author</th>
                <th>Duration</th>
            </tr>
        </thead>
    </table>
 <input type="button" style="width: 130px; height: 60px" value="send AJAX11" onclick="sendAja11();" />

Ou est mon erreur ?

Merci d'avance
Phil