In my application there is one tab start new application in which 4 links come. when I click on any link a child window opens. Suppose I opened 2 child windows from that links. Now I click again on start new application and then open other 3 child windows from links. now when I logoff only the parent window and the 3 child windows opened at last are closed and the 2 child windows opened earlier are not closed. I want them to close
My code from where child window is opening is
if(rowData.productVersion == “1001”){
childWindow[childWindow.length]=is1001Opened=window.open('/eApps/layout/multipleAppPage.jsp?windowID='+windowID+'&newTitle='+rowData.productCode+'¶mTemp='+uri_encode);
}else{
childWindow[childWindow.length]=window.open('/eApps/layout/multipleAppPage.jsp?windowID='+windowID+'&newTitle='+rowData.productCode+'¶mTemp='+uri_encode);
}
And my logout code is
{
$('#'+id).click(function(event){
event.preventDefault();
$('#centerContent').load('<%=request.getContextPath()%>/'+target);
});
} else {
$('#'+id).click(function(event){
event.preventDefault();
var r=confirm("logout");
if (r==true) {
for (var i=0;i<childWindow.length;i++) {
if (childWindow[i] && !childWindow[i].closed)
childWindow[i].close();
}
window.close();
}
});
}
I have resolved the issue.
earlier I declared the variable as
Now I have made the variable static