Create a Popup window : window « Javascript Objects « JavaScript DHTML






Create a Popup window

 
    
<html>
<body>
<script language="JavaScript">
    var popup = window.createPopup();
    popup.document.body.innerHTML = 'This will navigate to another site!';
    popup.document.body.style.backgroundColor = 'yellow';
</script>
<input type="button" 
       onClick="location.href='http://www.java2s.com';" 
       onmouseover="popup.show(100, 100, 200, 100, document.body);" 
       onmouseout="popup.hide();" 
       value="Navigate to Another Site">
</body>
</html>

    
      
        
  








Related examples in the same category

1.Set Default Status Information
2.Execute Javascript
3.Hide a window
4.Is window Open
5.Windown screen Left
6.Navigate window to a URL
7.Move window By
8.Move window to
9.Clear Interval
10.Clear Timeout
11.Display confirm dialog
12.Define dialog arguments
13.Set the dialog window left
14.Set dialog window top
15.Set dialog window width
16.Set the dialog window height
17.Is window closed
18.Display an alert dialog
19.Close a window
20.'offScreenBuffering' Example
21.Open a new window and close it
22.Open a new Window
23.Print a window
24.Create a prompt
25.Window resize By
26.'screenTop' Example
27.Set Timeout (window.setTimeout)
28.Show a Popup
29.Show Help (window.showHelp('URL'))
30.Show Modal Dialog (window.showModalDialog('URL', myArguments, ''))
31.Window self
32.Show Modeless Dialog (window.showModelessDialog(..))
33.Display information in status (window.status)
34.Let window navigate to a URL (window.navigate('http://www.java2s.com'))
35.Show Browser UI
36.Add Desktop Component
37.Handling Status Message Changes