Popup Input Dialog Boxes

Click here for an example.

Use the prompt function to create a prompt to collect information for use in your web page. Study the example to see how they are used. Notice that they are used within SCRIPT blocks. Since they are javascript functions, they can only be used within a SCRIPT block designated as LANGUAGE=JAVASCRIPT. Once you have collected your basic information, you display it with the document.write function. Study both the prompt function and the document.write function. Notice that the prompt function requires a second argument. In one of the examples, we used "erase this" and the others we just used "". Make sure you are clear on the purpose of this second argument. Also make sure you understand how the plus sign and quotations are used in the document.write function.

ASSIGNMENT:

Your job is to ask the user a total of ten questions (in addition to the three supplied in the example) and display the results on a web page (like done in the example).