This is a discussion on Is it possible to close the parent window (main web browser window) from a child win within the HTML, CSS and Javascript Coding Techniques forums, part of the Web Development category; Is it possible to close the parent window (main web browser window) from a child window?...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| Is it possible to close the parent window (main web browser window) from a child window?
__________________ "GP_Logesh..." |
| Sponsored Links |
| |||
| A: Put the following in the child: <script langauge="JavaScript"> <!-- opener.close(); //--> </script> Although you'll need to make sure that the opener has been defined for browsers that don't have it by default, by placing the following in the parent: <script language="JavaScript"> <!-- msgWindow=open('',window,'resizable=no,width=200,h eight=200'); msgWindow.location.href ='apage.html'; if (msgWindow.opener == null) msgWindow.opener = self; //--> </script> |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Session never expires in site unless you close the window | ursklakshmanan | PHP Programming | 1 | 03-31-2008 02:07 AM |
| How to open popup onmouseover and to close the same window onmouseout javascript? | bluesky | HTML, CSS and Javascript Coding Techniques | 3 | 12-07-2007 05:51 AM |
| Need to close parent window after closing child window. | S.Vinothkumar | ASP and ASP.NET Programming | 6 | 11-05-2007 05:08 AM |
| Session in child window | Sivamurugan | PHP Programming | 3 | 09-11-2007 04:39 AM |
| How to pass the value from the child window to parent window in javascript? | kingmaker | HTML, CSS and Javascript Coding Techniques | 1 | 09-04-2007 02:18 AM |