how to call back to server using fnReloadAjax
how to call back to server using fnReloadAjax
Hi all,
I have 2 datatables in one page. The first one contains all the user data and the secone one contains the products belonging to a particular user. When i press a row of the table 1, table 2 will automatically refresh and retrieve the new data of the pressed user in the table 1. I tried to use fnReloadAJax but it is not successful coz the post back url does not automatically include all the necessary params like sEcho, sDisplayStart... Can anyone tell me whether fnReloadAjax is correct in this situation or do i have to use sth else ?
I have 2 datatables in one page. The first one contains all the user data and the secone one contains the products belonging to a particular user. When i press a row of the table 1, table 2 will automatically refresh and retrieve the new data of the pressed user in the table 1. I tried to use fnReloadAJax but it is not successful coz the post back url does not automatically include all the necessary params like sEcho, sDisplayStart... Can anyone tell me whether fnReloadAjax is correct in this situation or do i have to use sth else ?
This discussion has been closed.
Replies
[code]
$("#table1 tbody tr td .showProducts").bind('click',function(event){
oTable2.fnSettings().sAjaxSource = this.href;
oTable2.fnDraw ();
};
[/code]
[code]
oTable2.fnSettings().sAjaxSource = this.href;
[/code]
does not work with IE 9.
Its not - no :-). As the documentation note for fnReloadAjax notes, if you are using server-side processing, you need to just call fnDraw() - however, to modify the source address, you need to do something like your server post - which looks just about perfect to me.
Regarding the IE9 issue, can you alert what this.href is? Perhaps you need a this.getAttribute('href')?
Allan