here is the java script where i used window.close() function but it's not working.
<script language="javascript"> var answer = confirm("Session expired! Want to go to the home page?")
if (answer){
window.location = "index.jsp"
}
else{
window.close();
}