Why i'm getting more than request and responses
Why i'm getting more than request and responses
tameem07
Posts: 7Questions: 2Answers: 0
when i'm searching a single alphabet i'm getting 6 request and 6 responses
This discussion has been closed.
Answers
Please provide more details of what you are doing, what you expect and your Datatables initialization code.
My guess is you have server side processing enabled (
serverSide: true
) and that you have type 6 characters into the search input. This is expected behavior as by default each character will perform a search.Kevin
yes thats true that ive enabled server side and yes i've 6 columns too ..how can it be fixed?
and if i try (serverSide: false) an error flashes something like this: NoMethodError (undefined method `[]' for nil:NilClass):
That won't affect the requests sent. In your screenshot above did you type 6 characters?
Don't know what that would be. We will need to have a link to you page or a test case to debug that error.
https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
Kevin
I'm sorry i cant provide a link of my page.
Here is the code that i used to search by pressing enter.
I'm trying to find out what causes so many requests when I simply press enter on a single column
This is how my header looks like
I don't see anything that stands out as an issue with the code. Please use one of the server side processing templates here to replicate the issue:
https://datatables.net/manual/tech-notes/9#Server-side-processing
Is your code snippet executed inside a loop?
Kevin
My code is not inside a loop.. Well ive tried something which works well and gives 1 request and response as expected .. But now the problem is it works in footer can you please guide me so that it can work in header
Here is an example:
http://live.datatables.net/giharaka/1/edit
Note the us of
orderCellsTop
to move the sorting event listeners to the top header row.Kevin
Thanks kevin the problem is resolved..