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

HTML links to images in table data, suppress GET request

$
0
0

Dear all,

I have the following instantiation of a Datatable:

 var data_table = $('#guideline_entries').DataTable({
    data: table_data, 
    dom: "Tfrtip",
    columns: [ 
      {data: null, defaultContent: '', orderable: false, "visible": false },    /*  data-id column */ 
      {data: 'title', 'width': '100%'}, 
      {data: 'html', "visible": false}
    ],
    order: [ 1, 'asc' ],
    tableTools: {
        sRowSelect: "os",
        sRowSelector: 'td',
        sSwfPath: '../datatable/DataTables-1.10.0/extensions/TableTools/swf/copy_csv_xls_pdf.swf',
        aButtons: [

        ]
    }
  });

The data for the table is contained within the javascript variable table_data.

The issue, i am facing, is with column html that is meant to hold HTML content. In the HTML content, if there are links to images such as:

<img src="some_image.png" />

The Datatable, while loading, tries to fetch the image content, even though the column's visible is set to false. I can see this in Chrome's debugger where there is a failed GET request for the image.

Is there a way to suppress the Datatable from issuing a GET request to fetch images when the table's data contains HTML links to images? Especially in this example, where the column is not visible and thus no rendering is required.


Viewing all articles
Browse latest Browse all 2366

Trending Articles