how to initiate the loading of a table not from the first but from another page?
how to initiate the loading of a table not from the first but from another page?

I need to load not the first but the other page when the table is initiated. Is it possible to do this?
my test case is http://montaj.vianor-konakovo.ru/goods_new111.html
in line 1158 of the goods_nev.js file I give the command to go to page 6:
table.page (5);
but the table does not load this page what could be the problem? And is it possible to initiate a table right away, for example from page 6?
This discussion has been closed.
Replies
If you are using
serverSide
processing then you may be interested in thedeferLoading
option as shown in the example.The
page()
docs state this:See examples in the
page()
docs.Kevin
in the developer tool, I saw that on command
forms a request ajax with the parameter start=0
I think this is the problem. And why this happens I can not understand.
Sounds like you are using server side processing. Did you use the
deferLoading
option? This example works withdeferLoading
.http://live.datatables.net/fujiqalo/1/edit
Where do you have this? If you are using it directly after initialing Datatables, like this:
Then it is going to execute before the Ajax response (and Datatables initialization). This code won't load page 5.
**EDIT:*** You can see this not work if you comment out the
deferLoading
option in my example.Kevin
I have two variables known before the initiation of the table — the page number and page size. I need to optimally display the page with the specified size and number in the shortest time. How to do it?
variables change from time to time. And when I say the best way, I mean that it is advisable without the overhead of loading and displaying the first page
Maybe I'm not understanding the real question as it seems we keep going over the same answers.
Use
deferLoading
to keep Datatables from requesting the first page on initialization. This is used withserverSide
processing. Are you using server side processing?Use
page.len()
to set the page followed bypage()
to load the page.I updated the example to show setting the page length:
http://live.datatables.net/fujiqalo/2/edit
If this doesn't help then please update my example with what you are trying to do.
Kevin
can this be done immediately after the initiation of the table?
That is what my example is showing.
Kevin
I am immensely grateful to you for constructive valuable advice. Following them, I made adjustments to the code and the very first attempt was successful.
Fantastic, glad you got it!
Kevin
Fiction I'm immensely happy myself much closer to the completion of the project. You are a wizard of code. Could you expertly estimate the loading time of my page?
Could you, as an expert, evaluate the loading speed of my page http://montaj.vianor-konakovo.ru/goods_new111.html?
See if this tutorial helps you to profile your web pages.
Kevin
sorry I was interested in your expert opinion.the fact is that in my opinion the page loads quite quickly. The customer wants to quickly answer the question how much faster I did not receive an answer. Yes, and I could hardly get it because this is an area of subjective sensations
Profiling a page is not my area of expertise. Allan could probably help but you will likely need to pay for that service.
Kevin