download (POST + GET) Request-URI Too Long
download (POST + GET) Request-URI Too Long
Hello all,
currently I'm searching for a solution to get the same result with the download plugin (POST + GET) as i got with the download (GET only) Plugin from your Site. The problem is that my table has many columns and because of that the URL request is too long for a get request with all the params.
How can i make a POST instead of GET request with the params ( "this.s.dt.oApi._fnAjaxParameters( this.s.dt )" ), because the second example plugin POST + GET, post only custom params.
This question has accepted answers - jump to:
Answers
It looks like the POST version of the plug-in isn't using the
oParams
options that it created. What you could do is loop over that array and add the values to the form in exactly the same way theaoPost
array is used.Possibly a better option would be to use only oParams and loop over that. Add the custom parameters to that array...
I'll update the site with that change shortly.
Allan
Thanks for the answer.
do you have an code example for the loop. For my Excel Export funktion i need the same request structure as GET, because of current column filter strings etc.
I tried to build a loop , but I have problems implementing the Operating in Javascript.
Sorry for the delay in replying - I've updated the plug-in now.
Allan
Hey Allan,
i tried your example, but it doesnt work. I got an error in line 22 "aoPost.push is not a function".
If i understand it correctly the variable "aoPost" is an object and cant be pushed?
Also the loop create input fields with an "name" and "value" attribute from the object "aoPost". But the "aoPost" isn't a simple "name/value" collection. That can't work right?
Urgh - it doesn't quite work with the new style 1.10 Ajax options. I'll need to find time to update it. Basically
aoPost
is an object and it needs to loop over that object.Allan
I've just completely rewritten the plug-in. The same plug-in now provides support for both
get
andpost
.Hopefully that will help!
Allan
Many thanks for your help!
The plugin works now but only after an short change of the iframe generation.
At line 30 of your source i got an error like "undefined iframe[0]" (testet in Firefox and Chrome), maybe because of other source code.
I revert the iframe generation to your previous solution and it works:
Hmm - interesting. I'm not seeing that error myself. I'll look into it a bit more.
Allan