Windows onClose Event issue

I am having an issue with an onClose() event in a pop up window. The main page has a grid and a button to add a new item which pops a window with an input form after it completes and closes the main page should refresh the grid. Everything works as expected on close the grid is updated properly. However, it then shows waiting for …. and the page hangs. Any ideas on a solution?

Main page code
function doAddAdGroup(){
dhxWinsForm = new dhtmlXWindows();
return true;
w2 = dhxWinsForm.createWindow(“w2”,600, 360,870, 500);
w2.setText(“Add new item”);
buildid= document.pscampsubmit.campbuildid.value;
prov = document.pscampsubmit.providerid.value;
custid=<?php echo $_SESSION['custid'];?>;
if (buildid==“”) alert(“Please select a Campaign”); else
w2.attachURL(“http://<?php echo $_SERVER['SERVER_NAME'];?>/tools/manage/”+prov+“/psaddadgrouppop.php?id=”+buildid+“&custid=”+custid);


Close function from pop up
function closeWindow() {

Please attach the complete demo … leted_demo