I am trying to send a serialized data through query string/variable in a url. As you know when we do a serialize in js it builds a query string itself. I am sending this data to server side which is written in django. How can i do this or how can i collect the data in the django code.
This is what i am doing.
selected = $('input:checkbox:checked').serialize();
This gives me the result as multiselect_select_month=10&multiselect_select_month=11&multiselect_select_month=05
I want to send this in a url with other variables, and collect the hole string (multiselect_select_month=10&multiselect_select_month=11&) in a single variable.
Something like
serialized = 'multiselect_select_month=10&multiselect_select_month=11'
At the server side i am writing serialized = request.GET.get('serialized', '')
How can i send that serialized string(which is a query string) in a single variable so that i can catch that at the server side.
NB: I want to send other variables also with the above serialized data.
You need to URL-Encode
serialized, then you can send it in a single variable.