Hi all, I'm trying to call another jQuery function if confirm is true, here's the code:
jQuery("#adminForm_1").submit(function () {
var empty = false;
jQuery(":input", "#adminForm_1").each(function () {
empty = (jQuery(this).val() == "") ? true : empty;
});
if (empty) {
if (confirm('You have not filled out all of the fields, do you wish to continue?')) {
jQuery("#adminForm_1").validationEngine({
ajaxSubmit: true,
ajaxSubmitFile: "/index.php?option=com_database&view=tripdetails&Itemid=12&client=1&task=save",
ajaxSubmitMessage: "Client Trip Details Saved",
inlineValidation: false,
success: false,
failure: function () {}
});
} else {
return false;
};
}
});
^^ the above code doesn't work, but you'll see what I'm trying to do..