title: alert like function in javascript
body: <p>I want to create a modal popup in javascript. <br>
  But my requirement is whenever the popup open, it will stop executing next javascript lines until it is closed.</p>
  
  <p>for eg. </p>
  
  <pre><code>var bool = false;
  DisplayModal("Show Message");
  bool = true;
  alert("alerted only after closing the pop up : bool = true");
  bool = false;
  </code></pre>
  
  <p>So until I close the modal popup of <code>"Show Message"</code> bool would not be true. and when I close popup then remaining script will be run as in order after <code>DisplayModal</code> ...</p>
  
  <p>Similarly like <code>alert</code> but I do not want to override <code>alert</code>..</p>
  
  <p>I need some help, Thanks in advance...</p>
  
  <p><strong>Edit :</strong></p>
  
  <p>Try to explain a bit more..</p>
  
  <p>I want to stop execution when <code>DisplayModal</code> called <br>
  Stop execution<br>
  after then Pop-up shows <br>
  after the pop-up closed continue from next line (means : <code>bool = true; ...</code>)</p>