jquery dataTables plugin: dynamically modify ajaxSource

Posted by Anthony Koval' on Stack Overflow See other posts from Stack Overflow or by Anthony Koval'
Published on 2010-03-06T18:43:05Z Indexed on 2010/05/13 21:04 UTC
Read the original article Hit count: 525

Filed under:
|

hello!

on my page i have dataTable, which was initialized with, for example, sAjaxSource url like "/api/reports". when we're doing sorting, filtering it appends to url additional query-keys. I want do add keys "date_from" and "date_to" to sAjaxSource url (date intervals could be changed after table initialization). is there any entry-point function, before table reload, so i can do there smth like:

var oSettings = rtbl.fnSettings();
oSettings.sAjaxSource = "/api/reports/?type=sites&date_from=" + $("#date_from").text() + "&date_to=" + $("#date_to").text();

thanks for your help!

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about datatables