Confirmation Boxes

This JavaScript program just put up three confirmation boxes.

The first confirmation box had an undefined message. Usually you WANT TO AVOID this. In Netscape Navigator version 4, look carefully at this confirmation box so you can detect and fix this problem when it occurs in the future. (In Microsoft Internet Explorer, Mozilla and Netscape 6.0 you can't tell, which illustrates the fact that different browsers sometimes behave differently. Always test your code on several different browsers.)

The second confirmation box had a blank message. This was just a curiosity.

The third confirmation box illustrated offering the user an opportunity to confirm the correctness of entered data, or cancel the data entry. It contained a SAMPLE MESSAGE: Is this data correct? message.

Later, we will learn how to record and use the user's choice, OK or CANCEL