IT Community - Software Programming, Web Development and Technical Support

Is it possible to close the parent window (main web browser window) from a child win

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


Go Back   IT Community - Software Programming, Web Development and Technical Support > Web Development > HTML, CSS and Javascript Coding Techniques

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 10-26-2007, 11:49 PM
gp_logesh gp_logesh is offline
D-Web Trainee
 
Join Date: May 2007
Posts: 29
gp_logesh is on a distinguished road
Question Is it possible to close the parent window (main web browser window) from a child win

Is it possible to close the parent window (main web browser window) from a child window?
__________________
"GP_Logesh..."
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 10-29-2007, 03:53 AM
kingmaker kingmaker is offline
D-Web Genius
 
Join Date: Jun 2007
Posts: 882
kingmaker is on a distinguished road
Send a message via Yahoo to kingmaker
Smile Re: Is it possible to close the parent window (main web browser window) from a child

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>
__________________
The KINGMAKER
Makes Every Thing Possible

Stuffs (My Blog)
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


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


All times are GMT -7. The time now is 01:56 AM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0