title: jConfirm alert - jQuery plugin
body: <p>Am jConfirm for user confirmation.</p>
  
  <p>My first jConfirm doesnt stop for user action and just passes to next.</p>
  
  <p>My Code:</p>
  
  <pre><code>    $(function () {
  
      $("#UpdateJobHandler").click(function () {
  
          var JobHander = getJobHandler();
          if (JobHander.MaxInstances == 0) {
                  jConfirm('Continue?', 'Current Maximum Instances', function (ans) {
                      if (!ans)
                          return;
                  });
          }
  
          var json = $.toJSON(JobHander);
  
          $.ajax({
              url: '../Metadata/JobHandlerUpdate',
              type: 'POST',
              dataType: 'json',
              data: json,
              contentType: 'application/json; charset=utf-8',
              success: function (data) {
  
                  var message = data.Message;
                  var alertM = data.MessageType;
                  if (alertM == 'Error') {
                      $("#resultMessage").html(message);
  
                  }
  
                  if (alertM == 'Success') {
                      $("#resultMessage").empty();
                      alert(alertM + '-' + message);
                      action = "JobHandler";
                      controller = "MetaData";
                      loc = "../" + controller + "/" + action;
                      window.location = loc;
                  }
  
                  if (alertM == "Instances") {
                      jConfirm(message, 'Instances Confirmation?', function (answer) {
                          if (!answer)
                              return;
                          else {
                              var JobHandlerNew = getJobHandler();
                              JobHandlerNew.FinalUpdate = "Yes";
                              var json = $.toJSON(JobHandlerNew);
                              $.ajax({
  
                                  url: '../Metadata/JobHandlerUpdate',
                                  type: 'POST',
                                  dataType: 'json',
                                  data: json,
                                  contentType: 'application/json; charset=utf-8',
                                  success: function (data) {
  
                                      var message = data.Message;
                                      $("#resultMessage").empty();
                                      alert(alertM + '-' + message);
                                      action = "JobHandler";
                                      controller = "MetaData";
                                      loc = "../" + controller + "/" + action;
                                      window.location = loc;
                                  }
                              });
                          }
                      });
                  }
              }
          });
      });
  });
  </code></pre>
  
  <p>What am i missing?</p>