String Object's Length, Document.Location Properties, confirm and input dialog : JavaScript DHTML examples (example source code) » Window Browser » Dialog

JavaScript DHTML














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

 
String Object's Length, Document.Location Properties, confirm and input dialog

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

/*

Learn How to Program Using Any Web Browser
by Harold Davis 

Apress CopyRight 2004

ISBN: 1590591135
*/
<HTML>
<HEAD>
<TITLE>Properties</TITLE>
</HEAD>
<BODY>
<H1>
<SCRIPT
   var theString = new String()
   theString = prompt("Enter a string: ","")
   document.write('The string "' + theString +  '" is ' + 
      theString.length + ' characters long.'); 
   if (window.confirm("Do you want to go to Java2s today?")) 
     window.location = "http://www.java2s.com"
     </SCRIPT>
</H1>
</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.   Working with the Alert Confirm and Prompt Methods
5.  Alert box dialog with line breaks
6.  Button click to display dialog
7.  Pop up Window centred
8.  Display a confirm box dialog
9.  Display a prompt box dialog
10.  Confirm Dialog Box
11.  The Prompt 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.