This code looks like a form-submission and callback after that.
Yeah, you can do it without using that library.
$("#yourForm").submit(function() {
$.ajax({
url: $(this).attr("action"),
data: $(this).serialize(),
cache: false,
success: function(response){
$("#onsuccessmsg").html(response);
},
error: function(xhr){
$("#onsuccessmsg").html(xhr.responseText);
}
});
});
-KR