1. Home
  2. Computing & Technology
  3. JavaScript
photo of Stephen Chapman

Stephen's JavaScript Blog

By Stephen Chapman, About.com Guide to JavaScript since 2004

Alert

Monday April 21, 2008
The dialog boxes built into JavaScript are best avoided in live web pages

Using alert(), confirm(), and prompt() used to be a useful way of interacting with your visitors. Not any more. Not only do these dialog boxes interfere with your visitor's interactions with other programs that they may be running on their computer apart from their browser as well as other pages that they may have displayed in other tabs within their browser, but in some browsers the dialog box also provides them with the option to stop running your JavaScript code completely. This makes using the alert() dialog far more suited to your using it to debug your script as this eighteenth modern JavaScript tutorial describes.

Alert

Comments

No comments yet. Leave a Comment

Leave a Comment

Line and paragraph breaks are automatic. Some HTML allowed: <a href="" title="">, <b>, <i>, <strike>

More from About.com

  1. Home
  2. Computing & Technology
  3. JavaScript