The Final Script : JavaScript DHTML examples (example source code) » Window Browser » Dialog

JavaScript DHTML














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

 
The Final Script

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>
  <meta http-equiv="Content-Script-Type" content="text/javascript">
  <title>My First JavaScript Script</title>
  <script language="JavaScript">
  <!--
    function passCheck(){
      if(prompt("Please enter your password",""== "letmein"){
        window.location = "/secure.html";
      }else{
        window.location = "/error.html";
      }
    }
  //-->
  </script>
</head>
<body onload="passCheck()">
  <noscript>
    <b>
      Sorry, but your browser either does not support JavaScript or your
      have it turned off. For information on JavaScript supporting browsers
      or how to turn it back on, please see the website of your browser's
      creator.
    </b>
  </noscript>
</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.  The Prompt Dialog Box
13.  Document for the Modeless Dialog Box
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.