You are doing way too much manual labor here. This will do the same work:
var url = 'http://test.XXXXXXX.com/api/event/form/optinNational.action';
$.ajax({
type : 'GET',
url : url,
data: $('#target').serialize(),
dataType : 'json',
success: function(data){
alert('successful');
}
});
And yes, its in the success callback you get your result back and know the call worked. Errors result in thecallback error
.