The purpose of alert() IS to halt the script, while the user is "alerted" to something. This is the definition of a modal message box. That is what it is there for, and there is no sense in hacking a "fix" that works for an aberrent browser, or a browser with goofy settings, but then causes trouble and irritation for the user with all other browsers.
The purpose of the "do nothing" script is to test the alert() function and the changing of background colors on different browsers, so that I can make a product that will work properly for any customer regardless what browser they use. What a radical concept! This is supposed to be standard operating procedure for all this web stuff, but unfortunately compatibility is often not achieved. Since it revealed this simple misfunction, then it clearly "did something".
Somewhere, someone knows the answer to this. And I am hoping they will find this and help.