title: how to get a callback refresh function after alert is displayed?
body: <p>I am try to make this simple password function in jquery work as I need it to. Right now, on page load, you are prompted to enter a password to see the body of the page. If the password is incorrect, you get an alert that it is wrong. That all works but it is dead from there.</p>
  
  <p>What I need is a button to "try again" in the alert which simply refreshes the page so that you can try again.  How do I do this?  Perhaps someone has a solution that would work?</p>
  
  <p>I <strong>cant use js fiddle properly with this type of task</strong> since you wouldn't be able to see the code if pass is incorrect (therefore not seeing my issue). So, I must paste all code here. I hope that is ok.</p>
  
  <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
  &lt;title&gt;-&lt;/title&gt;
  &lt;/head&gt;
  &lt;body style="display:none;color: #000;"&gt;
  &lt;script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"&gt;&lt;/script&gt; 
  &lt;script type="text/Javascript"&gt;
  $( document ).ready(function() {
  var password
  var pass1="123"
  password=prompt('Please enter password to view page')
  if (password==123)
  { $('body').show(); }
  else{
    alert('password incorrect! Try Again!')
  }
  });
  &lt;/script&gt; 
  This is the page content that was password protected
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>