Creates a modal dialog box

Creates a modal dialog box that displays the specified HTML document.

  • A modal dialog box retains the input focus while open. The user cannot switch windows until the dialog box is closed.
  • User have not option for minimize or maximize the popup window.
  • User can close the popup window.
  • It works in all browsers like IE, Firefox and Chrome

Example:

Create Modal Dialog Box
Dialog Height:

 
Code:

Create Modal Dialog Box <br />
Dialog Height:&nbsp;
<select name='oHeight'>
	<option>200</option>
	<option>300</option>
	<option>400</option>
	<option>500</option>
</select>&nbsp;&nbsp;
<input onclick="window.showModalDialog(
	'http://blogfornet.com/author/nikunj.aspx', '',
	'dialogHeight:' + oHeight.options[oHeight.selectedIndex].text 
	+ 'px;')" type="button" value="Push To Create" />