Here is an example of my response:
[{"0": "[email protected]"}, {"1": "[email protected]"}, {"2": "[email protected]"}, {"3": "[email protected]}, {"4": "[email protected]"}, {"5": "[email protected]"}, {"6": "[email protected]"}]
I am attempting to interpret this using the following HTML:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function(){
document.write('Getting JSON response...');
$.getJSON(<my django url>,
function(data) {
alert("receiving"+data["0"]);
});
});
</script>
</head>
<body>
</body>
</html>
However, I do not see any alert box with the data displayed, only the "Getting JSON response..." message appears on the screen.
This is my return statement:
return HttpResponse( simplejson.dumps(result) , content_type='application/json')