I want to close the current window, when I click the close button. The below code, I tried is not working for me. I tried with an alert inside the function and I can see the alert popping up but the window isn't closing. Please help me on how to solve this.
My function :
<script type="text/javascript">
function closeWindow()
{
window.close()
}
</script>
The html button :
<br />
<input type="button" class="subButton" value="close" onclick="closeWindow()"/>
<br />