Quantcast
Channel: DataTables 1.9 — DataTables forums
Viewing all articles
Browse latest Browse all 1816

Questions on: bStateSave

$
0
0
Hey Allan,

Thanks for the extraordinarily useful plugin!!

So here's my scenario - I have a datatable with properties set to true for bServerSide, bStateSave, and bPaginate. I'm returning records using sAjaxSource (via jSon data). Each of the results links off to a news story on a separate page. Everything is pretty much working as expected, however, I'm wondering if anything can be done regarding the following -

After running a search for something, clicking on a result, and clicking the back button, my sAjaxSource method gets hit again - resulting in the 'Processing' text to come up again. You'd think that the method wouldn't be hit again and that the Ajax results would still be loaded from the first hit. I also noticed that this only seems to happen with Internet Explorer & Chrome. Firefox doesn't seem to have this issue (the method doesn't get hit after hitting the back button). Here's the code I'm using -

		var oTable = $('#dTable').dataTable({
                "bProcessing": true,
                "bServerSide": true,
                "bStateSave": true,
                "fnStateSave": function (oSettings, oData) { save_dt_view(oSettings, oData); },
                "fnStateLoad": function (oSettings) { return load_dt_view(oSettings); },
                "bPaginate": true,
                "bAutoWidth": false,
                "sAjaxSource": "/Json/Results",
                "bLengthChange": true,
                "bFilter": true,
                "iDisplayLength": 10,
                "aLengthMenu": [[10, 20, 30, 50], [10, 20, 30, 50]],
                "sPaginationType": "full_numbers",
                "oLanguage": {
                    "sSearch": "Search:"
                },
                "sDom": '<"top"lf<"clear">>rt<"bottom"ip<"clear">>',
                "fnDrawCallback": function () {
                    var filterId = document.getElementById('input_filter');
                    var filterChildNode = filterId.firstChild.childNodes[1].value;

                    $("#dTable").removeHighlight().highlight(filterChildNode);
                },
                "aaSorting": [[0, "desc"]]
            });



Any advice would be appreciated!

Thanks!!

Matt

Viewing all articles
Browse latest Browse all 1816

Trending Articles