title: JavaScript alerts in an onclick in a Chrome extension popup immediately disappear
body: <p>I'm working on a Chrome extension, and want to use prompt() to get input from the user when they click on certain elements.  Unfortunately, for some reason, I can't get prompt() or alert() to work when called as an onclick (or in a jQuery $('#something').click(function), which is how I originally ran into this).</p>
  
  <p>To wit, if I use the HTML below as the popup.html for my extension, the first alert shows up, but the second one flashes on the screen and then immediately disappears without any user intervention.  And then the extension popup also immediately closes.</p>
  
  <pre><code>&lt;script&gt;
  alert("This alert works");
  &lt;/script&gt;
  &lt;input type="button" onclick="alert('This one disappears')" value="Button"/&gt;
  </code></pre>
  
  <p>Any thoughts on why this might be happening and how to fix it would be greatly appreciated.</p>