Quantcast
Channel: DataTables 1.10 — DataTables forums
Viewing all articles
Browse latest Browse all 2366

Can't get ajax.url to load my new url

$
0
0

From the docs on url().load() I did this

      dt.ajax.url("https://10.4.0.116/newsource).load();

on a DataTable initialized thus in foo.html:

var dt = $('#pbos').DataTable( {
    // for export testing
    "dom": '<"clear">lfTrtip',
    "oTableTools": {
        "sSwfPath": "/swf/copy_csv_xls_pdf.swf",
    "aButtons":[
        "copy",
        "csv",
        // "xls",
        "pdf",
        "print"
    ]},

        "processing": true,
        "serverSide": false,
         "ajax": {
        "url": url,
         "type":"GET"
     },
        "columns": [
            {
                "class":          "details-control",
                "orderable":      false,
                "data":           null,
                "defaultContent": ""
            },
            { "data": "type" },
            { "data": "startTime" },
            { "data": "endTime" },
                    ],
        "order": [[2, 'desc']]
    } ); 

The table loads, displays, and works normally, but when I call the url().load(), the page (foo.html) is reloaded, instead of calling just newsource to reload the table. Any hints on what I might be doing incorrectly? Is there an easier way to load a new source of data into a DT table?


Viewing all articles
Browse latest Browse all 2366

Trending Articles