title: javascript confirm prevents screen update in Chrome
body: <p>I have a javascript function that does two things:</p>
  
  <ul>
  <li>Changes a table-row background color </li>
  <li>Issues a confirm() popup asking user to confirm the delete of the (highlighted) row</li>
  </ul>
  
  <p>It works fine on Firefox.  On Chrome, the popup appears.  But the background does not change color until AFTER I dismiss the confirm() box which kinda defeats the objective of letting the user know what row is to be deleted.</p>
  
  <p>I'm sure it has to do with the asynchronous nature of javascript.  But I need to know how to get around it.  Right now, the two lines of code are:</p>
  
  <pre><code>  $(icon).closest( "tr" ).css( "background-color", "yellow" );
    if ( confirm( message )) {.......}
  </code></pre>
  
  <p>What do I need to do to make sure the row is yellow while the popup is displayed and doesn't wait to change to yellow until after the popup goes away?  I can try delays, etc.  But that's grasping at straws.  Is there a 'correct' way to handle this?</p>
  
  <p>Again, works fine on Firefox.... nada on Chrome.  Haven't tried other browsers. </p>
  
  <p>Thanks.
  Jerry</p>