Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Nerea on Jan 29, 2009 08:59
open dhtmlx forum
Get correct windows

I've got a problem rcovering the window.

Each time I park down a window i put It a a position on the bottom of the page.
Each time that a window parks up I have to review all the postions of thw windows to put the on the rigth position without leaving spaces between them.

For this, I iterate al the dhxWins object but whe i go out of the function the window that is pointed is the last window created instead the one which is aclling the function.
Is there a way to recover then winload one on leaving the function?

Thanks!!!
Nerea

here is my code:

winload.attachEvent("onParkDown", function(win) { //Al minimizar la ventana situar abajo    
//Decrementar el contador de minimizadas
numpark = 0;
dhxWins.forEachWindow(function(winP) {
//si está parked eliminamos los espacion entre las que quedan parked        
if ( (winP.getText() != win.getText()) && winP.isParked()){
                            
//colocar la venta en la posición parked                     winP.setPosition( 200 * numpark, document.body.clientHeight - 37);
                
//Incrementar el contador de minimizadas
numpark = ++numpark;                        
}    
            
});
win.setDimension(winWidth, winHeight);
win.center();
return true;
});     
Answer posted by Support on Feb 03, 2009 08:30