Version 1.7.6 - How set property sAjaxSource

Version 1.7.6 - How set property sAjaxSource

fabiolg82fabiolg82 Posts: 3Questions: 0Answers: 0
edited July 2013 in General
How I do to set property sAjaxSource and reload datable. Here my script;

if (typeof oTable == 'undefined') {
oTable = $(objElement).dataTable({
"sAjaxSource": url} );
}
else
{
//Is possible set property sAjaxSource here?

oTable.fnClearTable( 0 );
oTable.fnDraw();
}

Replies

  • allanallan Posts: 63,389Questions: 1Answers: 10,449 Site admin
    Have you tried using fnReloadAjax: http://datatables.net/plug-ins/api#fnReloadAjax ? I don't know if it works with 1.7 which is quote old now and unsupported, but if not, then it likely won't be too difficult to make it work.

    Allan
  • fabiolg82fabiolg82 Posts: 3Questions: 0Answers: 0
    I try this code and works fine.

    var oSettings = oTable1.fnSettings();
    oSettings.sAjaxSource = url;
    oTable1.fnClearTable( 1 );
    oTable1.fnDraw();

    Thank you
This discussion has been closed.