when the table after the event xhr completes the creation of all elements DOM?
when the table after the event xhr completes the creation of all elements DOM?

the fact is that in my table one column contains elements input.which I need to access after downloading data from the server.
however, when trying to access immediately after the event xhr I fail because the required item is not there yet. Tell me which event is better for me to use for my purpose?
This discussion has been closed.
Replies
xhr
triggers when the data has been returned, but not loaded. So in that event handler, you could useone()
to set a one-off event handler ondraw
which will be called once the data is loaded.Colin
if I understand you correctly. then the code should look like
I noticed that when I write code for the event page
then the page navigation stops working. how can I change the code so that the page navigation is not canceled?
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
my test case is http://montaj.vianor-konakovo.ru/goods_new111.html
Could you tell me an event similar init to the degree of readiness of the table for an event occurring after the event xhr
I'm not following, sorry. What do you want the event to do, and when?
Colin
after download the page data, I want to find the page row containing the specific data in the 1st column and restore the value in input the input element of this row.
but the problem is that this line may be outside the current displayed page and I get an error when trying to write to the input element, as I understand that it is not there. How to determine that the line is outside the current page, I have not yet come up with. I determine the row index by code
can you tell me the idea of solving the problem?
is it possible to change the search code of the row index so that the search area is only the rows that are displayed on the current page?
You can use
rows().every()
instead oftable.rows().eq( 0 )
. However to answer your question use therows()
selector-modifier
of{page:'current'}
.Kevin
I experimented with the program in debug mode and found out that my problems begin when I go to another page, I remember the data from the first column in the array, but when the page changes, there are none
and expression
which I use to search for the target string gives value _Api(0)
but I don’t understand what it is and how to process such a returned search result. Can you tell me something on this issue?
Could you try a simplified bit of code:
I'm not sure what
id_good
is or where it is being set though.Allan
Thank you for your advice. But I already managed to find out the source of the problem - this is the case when the line is not located - it just is not on this page, I just provided this case in the code (then nothing needs to be done) and the code began to work as it should.