Vault in dhtmlxwindows

Hi there,



I am using vault with dhmlxwindows like so(removed some code):









I am initializing window from a button. This works fine first time but if i close the window then try to reinitialize the ‘vault1’ id does not exist anymore. Is there a better way to attach vault to a window.



Thanks again for the great products.



Mike    


Hello,


content is deleted if window closes. So, you can replace the necessary html object before closing window. And when window opens, this object can be attached again:

dhxWins.attachEvent(“onClose”,function(win){
document.body.appendChild(document.getElementById(“vault1”))
document.getElementById(“vault1”).style.display=“none”;
return true;
})

dhxWins.window(‘upload’).attachObject(“vault1”);


the other solution is to hide window intead of deleting it, when the close button is shown (details can be found here dhtmlx.com/docs/products/kb/inde … 99&a=16518)



Thanks that did the trick