Categories | Question details Back To List | ||
gently detach the object from window without destroing it in our previous conversation: posted: Jan 27, 2009 05:44 | Direct link: http://dhtmlx.com/docs/products/kb/index.php?s=normal&q=7579 At some point, I would like to "detach" this object and attach new one, for example: MyUniverseWindow.window("createNewWorld").detachObject("createNewWorldDiv"); Is there a way to implement that? Thank you. Support, posted: Jan 27, 2009 09:08 | Direct link: http://dhtmlx.com/docs/products/kb/index.php?s=normal&q=7579&a=11592 My new question: But, I will need this object createNewWorldDiv again, e.g.: MyUniversialWindow.window("createNewWorld").attachObject("createNewWorldDiv"); createNewWorldDiv object will be destroyed and I will not be able to re-use it. I need: gently detach the object so I will able to attach it at some point again. Thanks again. Answer posted by Support on Jan 28, 2009 03:20 Solutions: 1. You can use appendObject() method and show/hide used/unused objects http://dhtmlx.com/docs/products/dhtmlxWindows/samples/init/append_object.html?un=1233141707000 2. You and detach it manually, for example: <div id="myObject"...></div> <div id="myOtherObject"...></div> // attaching 1st object dhxWins.window("w1").attachObject("myObject"); // detaching 1st object document.body.attachObject("myObject"); // <-- this will reattach object to body so window won't destroy it // attaching 2nd object dhxWins.window("w1").attachObject("myOtherObject"); |