jquery.redirect
jquery.redirect copied to clipboard
array data
How can I do this? $.redirect("{% url "/login.php", {'id[]': [1, 2]}, 'GET');
can I transfer an object only?
Sorry, I don't understand what your are trying to do. whats {% url?
On Wed, Mar 7, 2018 at 7:23 PM, Bronte2k7 [email protected] wrote:
How can I do this? $.redirect("{% url "/login.php", {'id[]': [1, 2]}, 'GET');
can I transfer an object only?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mgalante/jquery.redirect/issues/36, or mute the thread https://github.com/notifications/unsubscribe-auth/AAhCZeNAVC719iS342HxF6n5ZQg35qecks5tcCWggaJpZM4Sg7rK .
I'm sorry for the mistake I am want get redirect with parameters $.redirect("url "/login.php", {'id[]': [1, 2]}, 'GET');
example.com/login.php?id=26&id=34
I encountered the same problem, the redirect does not allow the sending of arrays of objects in JSON, I modified the line of getInput method where is:
else { name = parentString + "[" + name + "]"; }
in
name = parentString + "." + name
I ask the author to check if it is correct.
Can you provide an example of the data you are trying to send?
I was facing the same issue.
In my case Line 174 was the problem:
else if (typeof values[propName] === 'object')
My passed array is also an object so the function calls itself over and over again.
So I changed it to:
else if (typeof values[propName] === 'object' && !Array.isArray(values[propName]))
I am not sure if it is clever.
I Think you are able to reproduce this issue with
$.redirect("/login.php", {tmp: []}, "POST", "_blank");
Im checking it