Never use alert() for debugging20 Jan 2010
Imagine you are binding keyboard shortcuts on your website to specific actions. Like pressing Ctrl+S will submit the current form. Of course, Ctrl+S is already defined as a shortcut in the browser, so you will take care of preventing the default behavior in your custom function (using return false, e.preventDefault(), e.stopPropagation() or any method defined in your framework to do that)
So my advice is that you should never use alert for debugging. Use the console.debug() method shipped in firebur or directly write to the DOM but do not use alert().
Want to add something ? Feel free to get in touch on Twitter : @pixelastic