User input : JavaScript DHTML examples (example source code) » Window Browser » Dialog

JavaScript DHTML














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

 
User input

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


/*
JavaScript Unleashed, Third Edition
by Richard Wagner and R. Allen Wyke 

ISBN: 067231763X
Publisher Sams CopyRight 2000

*/

<HTML>
<HEAD>
<SCRIPT LANGUAGE = "JavaScript">
     function showBox() {
             userText = prompt("Enter the text for your " +
               "personalized browser window.","My own browser text")
           if (userText != null) {
              userWindow = window.open("""userTextWindow""toolbar=0")
              userWindow.document.write("<h1>" + userText + "</h1>") }
     }
</SCRIPT>
<BODY>
<FORM>
<INPUT
     Type="button"
     Value="Create Your Own HTML Page"
     OnClick="showBox()"
</INPUT>
</FORM>
</BODY>


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.  The Prompt Dialog Box
13.  Document for the Modeless Dialog Box
14.  The Final Script
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.