Open a dialog window : Dialog « Window Browser « JavaScript DHTML

Home
JavaScript DHTML
1.Ajax Layer
2.Data Type
3.Date Time
4.Development
5.Document
6.Dojo toolkit
7.Event
8.Event onMethod
9.Ext JS
10.Form Control
11.GUI Components
12.HTML
13.Javascript Collections
14.Javascript Objects
15.Javascript Properties
16.jQuery
17.Language Basics
18.Mochkit
19.Mootools
20.Node Operation
21.Object Oriented
22.Page Components
23.Rico
24.Scriptaculous
25.Security
26.SmartClient
27.Style Layout
28.Table
29.Utilities
30.Window Browser
31.YUI Library
JavaScript DHTML » Window Browser » Dialog 
Open a dialog window
  

<html>
<head>
<title>Open a dialog window</title>
<script type="text/javascript">
function openDialog(form) {
    var result = window.showModalDialog("http://www.java2s.com", form, "dialogWidth:300px; dialogHeight:201px; center:yes");
}
</script>
</head>
<body>
<h1>Internet Explorer Modal Dialog Window</h1>
<hr /> 
<form name="sample" action="#" onsubmit="return false">
    Enter your name for the dialog box:
    <input name="yourName" type="text" />
    <input type="button" value="Send to Dialog" onclick="openDialog(this.form)" />
</form>
</body>
</html>



           
         
    
  
Related examples in the same category
1.Displays and monitors the most used dialog boxes
2.Dialog in JavaScript
3. String Object's Length, Document.Location Properties, confirm and input dialog
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: check the return result
12.Document for the Modeless Dialog Box
13.Use prompt for password checking
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.What is the output of a confirm dialog
25.If OK button was clicked
26.Use if-else with confirm dialog
27.Prompt Input Dialog
28.Pass string parameter to alert dialog box
29.Pass integer value to alert dialog box
30.Assign returning value from prompt dialog box to your variable
31.A carriage return in alert dialog box
32.Escape string in alert dialog box
33.Tab key in the alert dialog box
34.New line character in alert box
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.