I’m confused by how to manage pop-up windows. My application has 5 windows the user can open by clicking on buttons They are all modal.
At the end of the apps, main page, there is this statement:
<script type="text/javascript">
<!--
var dhxWins = new dhtmlXWindows();
And this is the code which typically opens a window:
function openPointsDialog() {
var openPointsWindow = dhxWins.createWindow(“w1”, 200, 200, 620, 337);
openPointsWindow.setModal(true);
openPointsWindow.setText(“Calculate Points, Fees & Prepaid Interest”);
openPointsWindow.attachURL(“points.htm?etc=” + new Date().getTime());
openPointsWindow.denyResize();
openPointsWindow.denyPark();
}
Please explain what is happening (I’ve taken this project over and did not write this code).
The “new dhtmlXWindows();” is where the memory is allocated, right?
Is the method, createWindow also alocating memory?
At no time has the previous coder ever called the “unload()” method. Shouldn’t this be done? But I guess it should not happen whenever a window closes, because if it does, the “new dhtmlXWindows();” has to be called again. Is this right?
Basically, are calls to unload() paired with calls to “new dhtmlXWindows();” or with “createWindow()”? Or neither?
The reason why I’m asking this is because when a window opens, it seems as if the javascript that I posted never finishes executing. The progress bar at the bottom of IE8 never indicates that the window has fully loaded. Even after closing the pop up Window, the progress bar still indicates code is running. Is this an IE8 problem, or my problem?
Comments? Help?
TIA.