ConfirmBox

Alert Ok and cancel, on ok redirect to page.

by akshatha suchethan

HTML

<input type="button" id="BtnSubmit" value="Submit"/>

JavaScript

$("input[name='savedata']").click(function(e){
       var r = confirm("Are you sure you want to save now?");

       //cancel clicked : stop button default action 
       if (r === false) {
           return false;
        }

        location.href = "https://jsfiddle.net/kevalbhatt18/6uauqLn6/";

   });
document.getElementById("BtnSubmit").addEventListener("click", function(e) {
   var r = confirm("Are you sure you want to save now?");

   if (r) {
     location.href='https://rms.mresult.com/';       
   }
});