I am trying to pass an array of integers from a view to javascript in
an ajax call.
I know how to return json dump from a View so that javascript can
access it as an object like this:
VIEW
response_dict = {"PythonList": MyList, "EditType": edittype}
return HttpResponse(simplejson.dumps(response_d
I put in wrong variable name:
> var PIDS = obj.PackageIDS; //this brings back 3,2 for example, an
> array of integers.
should be...
var PIDS = obj.PythonList;
On Feb 13, 10:10 am, robinne wrote:
> I am trying to pass an array of integers from a view to javascript in
> an ajax call.
>
> I know
Unfortunately your question is not clear, and this "clarification"
does not really help matters. As far as I can tell, obj.PythonList is
already an array. If you do:
jArray = [obj.PythonList]
then yes, jArray[0] is indeed the whole contents of obj.PythonList.
But I don't understand why you want
Yea, that was it. I guess I wasn't quite clear on what was getting
passed back from the ajax call. I didn't realize obj.PythonList was
already a javascript array.
Thanks for your response, sorry my code wasn't very clear.
On Feb 13, 3:10 pm, Daniel Roseman wrote:
> Unfortunately your question is
4 matches
Mail list logo