ajax.reload(null, false) jumps to the first page
ajax.reload(null, false) jumps to the first page
Hi to everybody,
I'm using datatables without serverSide processing.
It works all fine, but when I make some CRUD operations and I will perform ajax.reload using the correct parameters (null, false) datatables jumps to the firstpage.
If I can ,with filtering, to have only 1 page, also with 100 rows and I scroll to the middle of the table, It remain on the exact point where I was before reload, but If I start form page 2 or 3 etc...it will return to the first page.
What could be the problem?
This question has an accepted answers - jump to answer
Answers
ajax.reload(null, false)
works here:http://live.datatables.net/lohiline/1/edit
Are you using
draw()
anywhere in that code flow?Have you used the browser's network inspector tool to monitor the XHR request and response to make sure its as expected?
Can you post a link to your page or a test case replicating the issue so we can help debug?
https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
Kevin
I don't know how to insert php page where is sent ajax call in thoose sites.
Here it's my datatables code flow:
It continues, but i can't post a second comment....
As Kevin said, we're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Cheers,
Colin
dom: "<'row'<'col-sm-12'P>>" +
"<'row'<'col-sm-6'l><'col-sm-6'f>>" +
"<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'i><'col-sm-7'p>>" +
"<'row mb-5'<'col-sm-12'>>",
Please re-read Colin's post.
This is the webpage that replicate the issue:
https://www.webscad.altervista.org/addebiti_ajax2.php?tuttiapprovati
TO LOGIN
email: info@guest.com
pssw: D@t@T4b!
I add a button to the bottom of the table that perform ajax.reload(null, false) so you can test it.
Thanks
I tried logging in but get this error:
Kevin
Try again, I fixed the problem.
Sorry for the inconvenience!
Got it thanks. I just realized that you are using SearchPanes and this same issue was reported in October. See this thread. The issue is seen in SP 1.2.1 which is the latest version. You can use the nightly build as described in the thread or wait for the next release.
Kevin
Perfect! It works!
Really Thanks