Javascript-Open new Popup Window on button click event

  1. <html>  
  2.    <head>  
  3.       <title>Sample Code</title>  
  4.       <script type="text/javascript">  
  5.          function OpenNewWindow(MyPath)  
  6.          {  
  7.             window.open(MyPath,"","toolbar=no,status=no,menubar=no,location=center,scrollbars=no,resizable=no,height=500,width=657");  
  8.          }  
  9.       </script>  
  10.    </head>  
  11.    <body bgcolor=#00ff00 alink=blue vlink=blue>  
  12.       <FORM name="windowEvent">  
  13.          Enter Path Of File Or Window Which You Want To Open : <input type="text" name="txtpath"/>  
  14.          <input type="button" value="Open" name="btnOpenPopup" onClick="OpenNewWindow(txtpath.value)" />  
  15.       </FORM>  
  16.    </body>  
  17. </html>