title: How to disable Modal pop up box
body: <p>When a button clicked it shows a modal box. That modal box contains two buttons. <code>OK</code> and <code>Cancel</code> button. When we click on the <code>OK</code> button it shows an alert message box, up to this I got correctly. But I want to disable the modal box when an alert message pop up. I tried lot of methods like</p>
  
  <pre><code>  $("modalFileStruct").('disabled', true);
    $("#modalFileStruct").fadeOut("slow");
    $("#modalFileStruct").addClass("fade");
    $("#modalFileStruct").setFocusable(true)
    $("#modalFileStruct").css('style','background-color: #000; opacity:1; z-index:1000;');
  
    document.getElementById("modalFileStruct").removeAttribute("tabIndex");
  
    $('#fileStruct').blur();
    $("#modalFileStruct").css("position","relative","z-index","99");
    $('#modalFileStruct').fadeIn('slow');
    $('#modalFileStruct').fadeOut('slow'); 
  </code></pre>
  
  <p>But it doesn't satisfy my need. Could anyone help me?</p>
  
  <p>This is my code</p>
  
  <pre><code>   $("#modalFileStruct").modal();//This is pop up the modal box
     //This is the click function of OK button inside the modal box
     function fileInfoClicked(){
      alertMessage('Error',"Attribute name contains special characters: " + inps[i],
              'error');
              return;
   }
  </code></pre>
  
  <p>//Code for alert message box</p>
  
  <pre><code> function alertMessage(title, message, type) {
  $.msgBox({
      title : title,
      content : message,
      type : type,
      modal : true
  });
  }
  </code></pre>