In a validation script, I set the class of invalid elements so that they are rendered in red,
then display an alert asking the user to correct the highlighted errors.
However in Chrome, the alert is displayed before the element is re-drawn. This could lead to confusion for the
user since there are no highlighted fields.
When you step through the code, all works fine as the page is redrawn at each step.