not able to close other opened tab in browser
- by tulsi
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>