I am using Dialog Box.
IF the user clicks on the OK Button then I am calling the function named okClickTest().
<ejs-button id="dialogBtn" content="SAVE TO DB"></ejs-button>
document.getElementById("dialogBtn").onclick = function () {
ej.popups.DialogUtility.confirm({
title: ' Confirmation Dialog',
content:CheckToUploadFile(),
okButton: {
text: 'OK', click: function () {
okClickTest();
this.hide();
} },
cancelButton: { text: 'Cancel', click: function () {
cancelClickTest();
this.hide();
} },
showCloseIcon: true,
closeOnEscape: true,
animationSettings: { effect: 'Zoom' }
});
};
Here is my function
function okClickTest() {
// Coding and Check OTHER FILEDS are NULL OR NOT (SET variable "a", TRUE OR FALSE...)
if (a == false){
//Cancle further operation
//Return false and HIDE THE DIALOG BOX
}
else{
// Continue my AJAX CALLED And Call my Controller Event
}
}
HERE IS MY QUESTION
How can I,
1) return TRUE OR FALSE from okClickTest().
2) hide the DIALOG BOX and cancel my further operation if, the "IF" condition is executed in my case?