Categories | Question details Back To List | ||
Attaching DIV to a window Hello, Just a quick question. I have a button that opens a window and attaches a div to this. However when I close the window and click the button again it fails with the following message. uncaught exception: [Exception... "Component returned failure code: 0x80004003 (NS_ERROR_INVALID_POINTER) [nsIDOMHTMLDivElement.appendChild]" nsresult: "0x80004003 (NS_ERROR_INVALID_POINTER)" location: "JS frame :: http://localhost/Axscend-Portal/v4/dhtmlxSuite/dhtmlxWindows/codebase/dhtmlxwindows.js :: anonymous :: line 87" data: no] Is this because the div is removed from the original document when attached? Scott Answer posted by Support on Nov 14, 2008 05:00 Hello, >> Is this because the div is removed from the original document when attached? Right, you may use hiding window instead of closing like this: dhxWins.window(id).attachEvent("onClose", function(win){win.hide();}); and then when you clicks the button just add: if (!dhxWins.window(id)) { // create window first time } else { // just show dhxWins.window(id).show(); } |