Could you send a message to a moderator (anyone whose name is green or blue) and ask to have your code edited? Or post again, but wrap your code in code tags ([code] to start, close it with [/code]). Otherwise the forums eat up your indentation which with Python we need. :)
Also: Python 2x or 3x? Are you using httplib?
Code:
return HttpResponse(jsonValidateReturn, content_type='application/json' ,mimetype='application/json')
What are the required arguments for this (I see a different list on the library pages at docs.python.org for version 2)? I ask because MIMEtype should be represented by Content Type as far as the browser is concerned.
When you run your Javascript, in your browser debugger, can you see anything else being returned? What errors are being checked in the
success: function(data) {
alert ("post is success");
},
error: function(request,error)
{
alert(request.responseText);
alert(error);
}
section? Those success and errors should refer to the ajax readyStates I think.
You may not be getting a readyState 4. Here are the states, and you should be able to see which one you get in your browser debugger as you step through your Javascript.

Originally Posted by
ibm article
0: The request is uninitialized (before you've called open()).
1: The request is set up, but not sent (before you've called send()).
2: The request was sent and is in process (you can usually get content headers from the response at this point).
3: The request is in process; often some partial data is available from the response, but the server isn't finished with its response.
4: The response is complete; you can get the server's response and use it.
Also back when I was doing ajax by hand I needed to add in a send() call just to make Opera happy, and I dunno if Opera fixed this or if jQuery (is that what you're using) already fixes this.
Bookmarks