Share this Page URL

Chapter 18. More JavaScript Fun > Creating a Drop-Down List of Links - Pg. 215

More JavaScript Fun // Show the data to the user // return confirm("Here is the form data you entered:" + "\n\n" + msg + "\n" + "Do you want to submit this data?") } //--> </SCRIPT> 215 Most of the function is spent getting the various form values. After that's done, a message containing all the values is constructed and then shown to the user via the confirm() statement. Figure 18.4 shows the dialog box that pops up. If the user clicks Yes, the confirm() statement returns true, and the form gets submitted; if the user clicks No, confirm() returns false and the form doesn't do anything.