I am using jQuery to retrieve JSN data from a server. The server responds with the JSN-encoded object. The problem is that after responding to the server, my success function is not called.
This is my request:
$ ('form'). On ('submit', event (event) {event.preventDefault (); $ .getJSON ('getAvailableRoom', function (data, textstats, jxaxhr) {warning ("success!"); // not being}}}} ); Here is the response from the server:
Response header content-type application / Jason Date Mon, 09 July 2012 20:02:10 GMT Transfer Overall 1.1 Teleprocess 01 (NetCachNetApp / 6.0.3 P2D5) Request header application / Jason, Text / JavaScript, * / * Accept via Q-encoding; Q = 0.01 Acceptable-encoding gzip, display Approval-Language N-us, N; q = 0.5 Host Exxpectance Proxy-Keep Connection-Live Referrer User-Agent Mozilla 5.0 (Windows NT 5.2; RV: 13.0) Geico / 20100101 Firefox / 13.0.1 With X-Requested- XMLHttpRequest Feedback {'ID': 'ASURC'}
Your JSON is invalid.
It should be:
response {"id": "ASURC"}
Comments
Post a Comment