JQuery never reaches success or fail on aspx returning json.
- by David
Basicaly I have my aspx page doing
<%
Response.Clear();
Response.Write("{\"Success\": \"true\" }");
Response.End();
%>
My JQuery code is
function DoSubmit(r) {
if (r == null || r.length == 0 || formdata == null || formdata.length == 0) return;
for (i = 0; i < formdata.length; i++)
{
var fd = formdata[i];
r[fd.Name] = fd.Value;
}
r["ModSeq"] = tblDef.ModSeq;
jQuery.ajax({
url: "NashcoUpdate.aspx"
, succsess: doRow
, error: DoSubmitError
, complete: DoSubmitComplete
, dataType: "json"
, cache: false
, data: r
, type: "post"
})
}
When I call the DoSubmit() function every thing works but the doRow or DoSubmitError functions never get called only the DoSubmitComplete function.
When I look at the response text in teh DoSubmitComple function it is
{"Success": "true" }
Every JSON tester I have tried says that this is valied JSON.
What am I doing wrong here?