Here is the Javascript code snippet that I am working with:
this.confirmBox = function(data) {
$.jconfirm((function(_this) {
return function() {
var objConfig;
objConfig = $.jconfirm("getConfig");
alert("here");
return true;
};
})(this));
return false;
};
this.beforeSend = function(event, jqXHR) {
if (this.confirmBox()) {
return this.disableSubmit();
} else {
return jqXHR.abort();
}
};
After running the script, the execution reaches alert("here")
and return true
within the confirmBox function. However, the issue arises as the ajax call does not seem to be triggered anymore. How should I modify the beforeSend function to properly validate the result of the checkBox (true or false)?