Mega Code Archive

 
Categories / JavaScript DHTML / Window Browser
 

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.rntsoft.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>