Prompts

This JavaScript program just put up four prompts.

The first prompt had an undefined message and sample value. Usually you WANT TO AVOID this. In Microsoft Internet Explorer or Netscape Navigator version 4, look carefully at this prompt so you can detect and fix this problem when it occurs in the future. (In 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 prompt had a blank message and undefined sample value. Usually you WANT TO AVOID this too.

The third prompt had a blank message and sample value. This was just a curiosity.

The fourth prompt illustrated offering the user an opportunity to enter data, and a brief message (the actual prompt as the word is used in ordinary English) saying what sort of data was to be entered. It contained a SAMPLE MESSAGE: Please enter the bank data message, and a blank sample value.

Later, we will learn how to record and use the data the user has entered.