not able to close other opened tab in browser
Posted
by
tulsi
on Stack Overflow
See other posts from Stack Overflow
or by tulsi
Published on 2012-11-02T10:40:48Z
Indexed on
2012/11/02
11:00 UTC
Read the original article
Hit count: 203
JavaScript
|html
hi please check the below code i am trying to open tab with name and after that try to close that tab but unable to close or else can anyone tell how we can close opened all tab (url1,url2) from parent tab (url) while close parent tab error in firebug is my_window is undefined
<form name="submitForm1" target="my_window" method="POST" action="http://localhost:8080/ADDMIBREP/">
<input type="hidden" name="uname" value="uname">
<a HREF="javascript:document.submitForm1.submit();">ADDMIBREPORT</a>
</form>
<a HREF="javascript: closepopup() ">remove</a>
</body>
<script>
function closepopup()
{
alert("hi");
if(false == my_window.closed)
{
my_window.close ();
}
else
{
alert('Window already closed!');
}
} <script>
© Stack Overflow or respective owner