Welcome visitor
* Login
* Register
It is currently September 16th, 2019, 12:15 pm
All times are UTC [ DST ]
* Search
View unanswered posts - View active topics

FORUMS » Client Side » HTML



Post new topic Reply to topic  [ 2 posts ] 
Author Message
  close a child window from the parent
PostPosted: December 28th, 2009, 8:14 pm 

Posts: 23
Hi, I have a main window and a child window. I want to close the child window when any link of the parent is clicked. Is there a way to do this? Dhtml maybe...


Top
 Profile  
 
  Re: close a child window from the parent
PostPosted: December 28th, 2009, 9:27 pm 
User avatar

Posts: 44
I think some JavaScript will be enough:
<!--creates the popup--><input type="button" value="open it" 
onclick="popup=window.open('http://www.scriptingok.com','childWin');" />
<a href="http://www.scriptingok.com" onclick="isclosed()">close popup on click</a>
<script type="text/javascript">
function isclosed(){
  if (window.popup != null && !window.popup.closed)
    {window.popup.close();}
  }
</script>


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

FORUMS » Client Side » HTML


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron