spacer
Yehuda Shiran November 12, 1999
Alert Dialog Boxes
Tips: November 1999

Yehuda Shiran, Ph.D.
Doc JavaScript

Developer News
OpenOffice 3.2 Lands Amid Critical Changes
Red Hat, IBM Firmly in KVM Virtualization Camp
Red Hat Talks Up Open Source Cloud Plans

An alert dialog box is a window that presents a message to the user with a single OK button to dismiss the dialog box. As long as the alert dialog box is showing, no other application or window can be made active. The alert() method accepts a string specifying the message to display:

alert("Click OK to continue...");

var message = "Click OK to continue...";
alert(message);

In fact, the single parameter to the alert() method can be a value of any data type, including representations of some ususual data types whose values you don't normally work with in JavaScript. This makes the alert dialog box a handy tool for debugging scripts. Any time you want to monitor the value of an expression, use the expression as the argument to an alert() method in your script.

Alert dialog boxes are often very annoying, because they disrupt the flow of a user's navigation around your pages. It is better to communicate with users via forms or by writing to seperate windows.


People who read this tip also read these tips:

Look for similar tips by subject:


The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers

webref The latest from WebReference.com Browse >
Search Engine Optimization: Selecting and Embedding Keywords · Are Google's Language Translation Web Services Ready for Prime Time? · Installing and Using Meeplace, the Business Review CMS
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
IBM DB2 10 for z/OS: Justifying the Upgrade · Living La Vida Colo: Choosing the Right Colocation Facility · FTC Concerns over Social Media Privacy Linger