0

Consider:

var isSaveRequired = false;
    
     function saveChanges() {
        if(isSaveRequired ) {
            if(confirm("<%=strings.getText("This is come from server side")%>")) {
                isSaveRequired=false;
                return true;
            }
            else {
                return false;
            }
        }
        return true;
    }

Here I need to replace confirm with bootbox.confirm (in our project, the bootbox.js library is there already).

function saveChanges() {
    if (isSaveRequired) {
        bootbox.confirm('<%= strings.getText("this msg come from server side") %>', function(result) {
            if (result) {
                isSaveRequired = false;
                return true;
                
            }
        });
        return false; 
    }
    return true; 
}

But here the problem is the pop up (unsaved data will be lost) showing correct as only, but if I click OK then it's not redirecting to another page based user choice.

But here the problem is the pop up (unsaved data will be lost) showing correct as only, but if I click OK then it needs to be navigating to another page based user choice.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Raptor
  • 1

0 Answers0