ajax.data and serverSide=false
ajax.data and serverSide=false
stadskle
Posts: 4Questions: 0Answers: 0
Hi,
I am working with the beta2 release and I need the request I am sending to the server to get the JSON data to be:
1. POST
2. include additional data
I was very happy to read https://next.datatables.net/reference/option/ajax.data and I made an ajax config object. I am able to send it as POST, however, there is not additional data included in the request. When testing with serverSide=true I can see that the data is included, but I do not want to use serverside processing.
Is it intended to be that I cannot use ajax.data when serverSide=true? (if so, why?). And if so, what can I do instead?
To make a simple test case I did this: http://live.datatables.net/pehuhaq/1/edit (yes it does not work, but use something like developer tools and you will see the parameters that are included in the POST request which is my point. You can see that data: {'test':'test-value'} is not a part of the request.
Suggestions are most welcome.
I am working with the beta2 release and I need the request I am sending to the server to get the JSON data to be:
1. POST
2. include additional data
I was very happy to read https://next.datatables.net/reference/option/ajax.data and I made an ajax config object. I am able to send it as POST, however, there is not additional data included in the request. When testing with serverSide=true I can see that the data is included, but I do not want to use serverside processing.
Is it intended to be that I cannot use ajax.data when serverSide=true? (if so, why?). And if so, what can I do instead?
To make a simple test case I did this: http://live.datatables.net/pehuhaq/1/edit (yes it does not work, but use something like developer tools and you will see the parameters that are included in the POST request which is my point. You can see that data: {'test':'test-value'} is not a part of the request.
Suggestions are most welcome.
This discussion has been closed.
Replies
What browser are you using?
Allan
Allan
Fix is here if you are interested: https://github.com/DataTables/DataTablesSrc/commit/4d968710b
Allan