How to close a child window from a parent window using javascript
Here i will explain how to close a child window from a parent window using simple javascript.
<meta name="Content-Script-Type" content="text/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.
Related posts:
- Removing Nodes using javascript
- Adding and removing child nodes using javascript and DOM
- Javascript Popup Chromeless Window
- Javascript popup window
- Add to favorites or bookmarking using javascript in firefox and internet explore [IE]
- Close Event In Javascript Using OnUnload()
- Close Event In Javascript For Firefox, IE and Chrome

Excellent, Superb
Interesting post :)Bookmarked it!
Love your blog I’m going to subscribe