The Prompt Dialog Box : JavaScript DHTML examples (example source code) » Window Browser » Dialog

JavaScript DHTML














Java Products
Java Articles
JavaScript DHTML Home  »   Window Browser   » [  Dialog  ]   

 
The Prompt Dialog Box

Please note that some example is only working under IE or Firefox.


/*
JavaScript Bible, Fourth Edition
by Danny Goodman 

John Wiley & Sons CopyRight 2001
*/


<HTML>
<HEAD>
<TITLE>window.prompt() Method</TITLE>
<SCRIPT LANGUAGE="JavaScript">
function populateTable() {
    var howMany = prompt("Fill in table for how many factors?","")
    if (howMany != null && howMany != "") {
        alert("Filling the table for " + howMany// for demo
        //statements that validate the entry and
        //actually populate the fields of the table
    }
}
</SCRIPT>
</HEAD>
<BODY>
<FORM>
<!-- other statements that display and populate a large table -->
<INPUT TYPE="button" NAME="fill" VALUE="Fill Table..." onClick="populateTable()">
</FORM>
</BODY>
</HTML>


Related examples in the same category
1.  Displays and monitors the most used dialog boxes
2.  Dialog in JavaScript
3.  Open a dialog window
4.   String Object s Length Document.Location Properties confirm and input dialog
5.   Working with the Alert Confirm and Prompt Methods
6.  Alert box dialog with line breaks
7.  Button click to display dialog
8.  Pop up Window centred
9.  Display a confirm box dialog
10.  Display a prompt box dialog
11.  Confirm Dialog Box
12.  Document for the Modeless Dialog Box
13.  The Final Script
14.  User input
15.  Yes No Confirmation
16.  Non string parameter for alert
17.  Dialog Box Demo
18.  Alert Window
19.  Main Page for show Modeless Dialog
20.  Document for the Modal Dialog
21.  Main Page for show Modal Dialog
22.  Create a pop up
23.  Alert Dialog
24.  Prompt Input Dialog








Home| Contact Us
Copyright ?2003 - 04 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.