When required is defined in a form field, Firefox 4 automatically shows a red border to this element, even BEFORE the user hits the submit button.
Try:
document.getElementById('myform').reset();