Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Mike on Aug 16, 2009 12:15
open dhtmlx forum
Vault in dhtmlxwindows

Hi there,

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

<div id="vault1" style="height:245px; width:430px;"></div>
<script>
            dhxWins.window('upload').attachObject('vault1',true);
         var vault = null;
vault = new dhtmlXVaultObject();
vault.create("vault1");
</script>

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    
Answer posted by Alex (support) on Aug 17, 2009 01:58

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 http://dhtmlx.com/docs/products/kb/index.php?s=normal&q=10199&a=16518)


Answer posted on Aug 18, 2009 19:51
Thanks that did the trick