Losing sDom buttons and filter after AJAX refresh
Losing sDom buttons and filter after AJAX refresh
I'm using this AJAX call to refresh my table. I know i need to redraw the table some how but not sure what the code would be for the option in my initialization. Appreciate any help, thanks
[code]
$("#ajaxchange").click(function(){
var campaign_id = $("#campaigns_id").val();
var fromDate = $("#from").val();
var toDate = $("#to").val();
var url = 'http://domain.com/account/campaign/ajaxrefreshgrid?format=html';
$.post(url, { campaignId: campaign_id, fromdate: fromDate, todate: toDate},
function( data ) {
$("#ajaxresponse").html(data);
});
});
[/code]
[code]
$("#ajaxchange").click(function(){
var campaign_id = $("#campaigns_id").val();
var fromDate = $("#from").val();
var toDate = $("#to").val();
var url = 'http://domain.com/account/campaign/ajaxrefreshgrid?format=html';
$.post(url, { campaignId: campaign_id, fromdate: fromDate, todate: toDate},
function( data ) {
$("#ajaxresponse").html(data);
});
});
[/code]
This discussion has been closed.
Replies
Allan
[code]
$("#ajaxchange").click(function(){
var campaign_id = $("#campaigns_id").val();
var fromDate = $("#from").val();
var toDate = $("#to").val();
var url = 'http://domain.com/account/campaign/ajaxrefreshgrid?format=html';
$.post(url, { campaignId: campaign_id, fromdate: fromDate, todate: toDate},
function( data ) {
$("#ajaxresponse").html(data)
oTable6.fnClearTable(0);
oTable6.fnAddData(data);
});
});
[/code]
[code]
<?php if($this->actualChange[$ktid] == 0) { ?>
<?php echo $this->actualChange[$ktid]; ?>
<?php } elseif($this->actualChange[$ktid] > 0) { ?>
<?php echo $this->actualChange[$ktid]; ?>
<?php } else { ?>
<?php echo $this->actualChange[$ktid]; ?>
<?php } ?>
[/code]