I've 2 php files: home.php & another_page.php
home.php :
<li><a href="another_page.php">Page2</a></li>
another_page.php:
$('#exit_button').click(function() {
window.close();
});
The If i navigate from home.php to another_page.php and press click exit button then it does not close the window!!!
How ever if i modify the home.php anchor links
<li><a href="another_page.php" target="_blank" >Page2</a></li>
After the above change the code works fine.
But i want to do it without opening the 2nd page in new tab.I tried with
parent.window.close(); OR window.open('', '_self', '', ''); window.close();
But didn't worked.please help me.