Closing the parent window ...

Closing the parent window ...

Many times I have been asked how to close a parent window without getting that ugly warning dialogbox. You know what the solution is pretty straight forward :)

Script of the Parent window:

<html>
 <head>
  <Script language=""javaScript"">
   window.opener=self;
   window.close();
   window.open('test.htm','Test','fullscreen');
  </script>
 </head>
 <body>
 </body>
</html>

Here 'Test' is a name of the window. You can give any name of your choice there. 'test.htm' is the name of the file which would be opened in fullscreen. This way we could avoid that ugly warning dialogbox.

Comments