javascript - jQuery Ajax call No element found issue -
i getting javascript error on firefox 3.5, when trying call ajax method.
please find error below:
xml parsing error: no element found location: moz-nullprincipal:{1a2c8133-f48f-4707-90f3-1a2b2f2d62e2} line number 1, column 1: ^
this javascript function:
function update(id) { $.ajax({ type: "get", url: root_url + "/sevice/udates.svc/update?id=" + id, success: function(response) { }, async: false }); }
the ajax call expects xml (perhaps due bad guessing) , tries parse , fails if nothing returned or not valid xml..
use datatype
option specify format of response.
from comments looks browsers cannot handle no-content response. so, workaround such cases might return service (even single space).
Comments
Post a Comment