facebook twitter youtube
in DOM - 16 Jan, 2009, This Tutorial Has Been Viewed 14,649 Times.
by admin - 3 comments
How to close a child window from a parent window using javascript
VN:F [1.9.22_1171]
Rating: 7.7/10 (3 votes cast)

Here i will explain how to close a child window from a parent window using simple javascript.


<title>Example For Child and Parent Window Operations</title>
<script language="JavaScript">
function closeDep() 
{ //mistonline.in //refer us for more tutorials scripts 
if (main && !main.closed) main.close() 
else{ alert("I think you have not open any child windows") 
} 
} 
</script>
<body> 
<div> <a href="http://www.mistonline.in/" onclick="main = window.open(this.href, 'win', 'height=650,width=700'); return false">
Mistonline tutorial world</a></div><p><input type="button" value="winclose" onClick="closeDep();"/>

Simple correct.Please give some feedback.

DEMO

VN:F [1.9.22_1171]
Rating: 7.7/10 (3 votes cast)
How to close a child window from a parent window using javascript, 7.7 out of 10 based on 3 ratings

Incoming search terms:




coded by nessus

Leave a Reply

  • //24 Oct 2009

    Excellent, Superb

    VA:F [1.9.22_1171]
    Rating: 0.0/5 (0 votes cast)
  • //23 Apr 2010

    Interesting post :) Bookmarked it!

    VA:F [1.9.22_1171]
    Rating: 0.0/5 (0 votes cast)
  • //25 Apr 2010

    Love your blog I’m going to subscribe

    VA:F [1.9.22_1171]
    Rating: 0.0/5 (0 votes cast)
Close
Please support the site
By clicking any of these buttons you help our site to get better