javascript - popup gets closed automatically -
i have refresh parent window once done changes in popup window, use :
 <body onunload="opener.location.reload();">   but closes window on event, save, whereas don't want close. want close window clicking window close or clicking close button in jsp "javascript".
for closing thru "close" button.
js :
function closeandrefresh(){     opener.location.reload(true);     window.close();  } 
solved problem
js:
var myclose = false;    function confirmclose()  {      if (event.clienty < 0)      {         myclose=true;      }  }    function handleonclose()  {      if (myclose==true)       {      	opener.location.href = "<%=request.getcontextpath()%>parent_jsp_path";          window.close();      }     }html:
<body onbeforeunload="confirmclose();" onunload="handleonclose();"> 
Comments
Post a Comment