Hi,
my tree has the possibility to remove nodes client-side (by using the context menu).
The tree itself is in a control which is in a jquery ui dialog.
When the jquery dialog gets closed and nodes were removed, I get the following error:
Error: NOT_FOUND_ERR: DOM Exception 8
This happens in ScriptResource.axd here:
The last line causes the error. In the callstack in chrome I can see that the tree is disposing itself. The code is only called if at least one node was removed.
This is the callstack:
a.RadContextMenu.attachContextMenu() at ScriptResource.axd:345a.
RadContextMenu.dispose() at ScriptResource.axd:116
Sys$_Application$dispose() at ScriptResource.axd:5200
Sys$_Application$_unloadHandler() at ScriptResource.axd:5488
(anonymous function)() at ScriptResource.axd:49
Sys$UI$DomEvent$addHandler.browserHandler() at ScriptResource.axd:4357
This is the client-side code which removes the node:
When the jquery ui dialog is closed, I remove the nodes server-side from the database.
Is there a problem in my javascript function for removing nodes?
Or is it possible that the dispose is called after the the jquery ui dialog contents were removed from the DOM? But why only in case that nodes were removed?
Thanks for your help.
my tree has the possibility to remove nodes client-side (by using the context menu).
The tree itself is in a control which is in a jquery ui dialog.
When the jquery dialog gets closed and nodes were removed, I get the following error:
Error: NOT_FOUND_ERR: DOM Exception 8
This happens in ScriptResource.axd here:
a.RadContextMenu.prototype = {initialize:
function
() {
......
},attachContextMenu:
function
() {
if
(!
this
._detached) {
return
;
}
this
._getContextMenuElement().parentNode.removeChild(
this
._getContextMenuElement());
this
.get_element().insertBefore(
this
._getContextMenuElement(), $get(
this
.get_clientStateFieldID()));
This is the callstack:
a.RadContextMenu.attachContextMenu() at ScriptResource.axd:345a.
RadContextMenu.dispose() at ScriptResource.axd:116
Sys$_Application$dispose() at ScriptResource.axd:5200
Sys$_Application$_unloadHandler() at ScriptResource.axd:5488
(anonymous function)() at ScriptResource.axd:49
Sys$UI$DomEvent$addHandler.browserHandler() at ScriptResource.axd:4357
This is the client-side code which removes the node:
function
OnCatalogTreeMenuItemClicked(sender, e) {
var
node = e.get_node();
var
value = e.get_menuItem().get_value();
if
(value ==
"delete"
) {
sender.trackChanges();
var
attributes = node.get_attributes();
attributes.setAttribute(
"Type"
,
"Deleted"
);
attributes.setAttribute(
"HasChanged"
,
"true"
);
node.set_visible(
false
);
sender.commitChanges();
}
e.get_menuItem().get_menu().hide();
}
When the jquery ui dialog is closed, I remove the nodes server-side from the database.
Is there a problem in my javascript function for removing nodes?
Or is it possible that the dispose is called after the the jquery ui dialog contents were removed from the DOM? But why only in case that nodes were removed?
Thanks for your help.