javascript - jQuery AJAX call doesn't execute success block -


i have javascript function ajax rest call spring controller grab stuff database , plot on map. reason success area of ajax call isn't executing, request returning status of 'success'. there reason why success block wouldn't execute complete block would?

query:

$j.ajax({         url:         url,         type:      'get',         datatype: 'json',         sucess:   function(json) {             console.log("gettestdata successful");             boxes = parsejsonfortestdata(json);             //console.log(">> boxes = '" + boxes + "' <<");         },         error: function(jqxhr, textstatus, errorthrown) {             console.log("gettestdata failed textstatus '" + textstatus + "' errorthrown '" + errorthrown + "'");         },         complete: function(jqxhr, textstatus){             console.log("gettestdata complete textstatus='" + textstatus + "'");              if( boxes.length != 0) {                 $j('#results_textfield').text(boxes.length + ' results found');             }             else {                 $j('#results_textfield').text(boxes.length + ' result found');             }         } }); 

parsejsonfortestdata:

function parsejsonfortestdata(json) {     console.log(">> in music.js function parsejsonfortestdata <<");     //...abstracted  } 

log:

ajax call api/rest/da/gettestdata/ music.js (line 310) http://localhost:8080/s2i/api/rest/da/gettestdata/  200 ok  39ms    jquery-latest.js (line 6054)  gettestdata complete textstatus='success' 

note none of console.log statements success block or parsejsonfortestdata appear in log file.

any ideas or advice helpful.

you have written sucess: instead of success:

that's why code not executed (and maybe should have related error in js console)


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -