For some reason I'm getting "SyntaxError: invalid label" error when I receive JSON data (see below) from a django function. Any ideas?
{ "id": "325", "from_date": "09-19-2011", "to_date": "09-20-2011" }
This is the jQuery code I'm using:
$(".edit_rec").click(function () {
var rec_id = $(this).attr('name');
$.post("/edit/", {
editid: rec_id
}, function (json) {
var content = $.parseJSON(json);
var to = new String(content.to_date);
var from = new String(content.from_date);
});
});
new String? And is this the complete response?