Chapter Six |
JavaScript messages to the user (Dialog Boxes) are useful when you wish to prompt input from the visitor to your pages, or tell them that they've made a mistake, or to have them make a decision.
|
The Alert box, which simply displays a message with an OK that the user must click to acknowledge having read it. alert(variable); variable is the literal string or variable you have set to a string, or a combination of both, displayed to the user.
|
The Confirm box, which gives the user an OK or Cancel option. If OK is clicked, something you specify happens, while Cancel can trigger another action or nothing at all, as you specify. confirm(variable); variable is the literal string or variable you have set to a string, or a combination of both, displayed to the user.
|
The Prompt box, usually used when a form has been incompletely filled out, which accepts a direct correcting text entry from the user.
prompt(variable1,variable2 ); variable1 is the literal string or variable you have set to a string, or a combination of both, displayed to the user.
|
Links: Introduction | Chapter One | Chapter Two | Chapter Three | Chapter Four | Chapter Five | Chapter Seven | Chapter Eight | Chapter Nine | Chapter Ten | Chapter Eleven | Chapter Twelve | Chapter Thirteen | Chapter Fourteen | Chapter Fifteen | Chapter Sixteen | Chapter Seventeen | Chapter Eighteen | Chapter Nineteen | Chapter Twenty | Chapter Twenty-one | Chapter Twenty-two | Chapter Twenty-three | Appendix A | Appendix B | Appendix C | Appendix D | Cover This free virtual book provided courtesy of: AutoScripter(tm), the site for professional Web Designers and Developers and WebWalker Virtual Press, virtual publishing on the Web since 1994 Other free e-books from WebWalker: The All American Terrorists | The Gnomes of Jost | For the Love of Entropy | The Trees of Kratva | The Arch of Rain Magicians | Lightshow | The Black Mancutters Guild | The Septoracle © Copyright 1997, 1999, 2000, 2001 John H. Keyes editor@jorika.com |