Hi,
I’m testing V4.1 Pro of the dhtmlx suite. I have noticed that V4 of the dp behaves differently to earlier versions.
[code]…
... var mnutree = new dhtmlXMenuObject(); ... mnutree = atabbar.cells("a1").attachTree(); mnutree.setImagePath("codebase/imgs/csh_vista/"); mnutree.setStdImages("leaf.gif","leaf.gif","leaf.gif"); mnutree.setOnClickHandler(function(id){fetchStuff(id);}); mnutree.enableSmartXMLParsing(true); mnutree.enableItemEditor(true); mnutree.enableDragAndDrop(true); mnutree.setDragBehavior("complex"); mnutree.enableKeyboardNavigation(true); // PRO Edition mnutree.enableKeySearch(true); // PRO Edition mnutree.enableContextMenu(mnumenu);
mnutree.attachEvent("onBeforeContextMenu", function(itemId) {
if (mnutree.hasChildren(itemId) > 0) {
mnumenu.hideItem('outher');
mnumenu.showItem('branche');
} else {
mnumenu.showItem('outher');
mnumenu.hideItem('branche');
}
return true;
});
mnutree.loadXML(“model/m_get_site.php”);
var myDP_org = new dataProcessor(“model/upd_tree_things.php”);
myDP_org.init(mnutree);
[/code]
In upd_tree_things.php
[code]…
/*
/* Stuff that is passed in from the dataprocessor that you don’t get to see.
/* tr_id
/* tr_pid
/* tr_text
/* !nativeeditor_status
*/
$posted = array();
if (!empty($_GET)){
foreach ( $_GET as $key => $value ){
if ( ( !is_string($value) && !is_numeric($value) ) || !is_string($key) )
continue;
if ( get_magic_quotes_gpc() )
$value = htmlspecialchars( stripslashes((string)$value) );
else
$value = htmlspecialchars( (string)$value );
$posted[$key] = $value;
}
} else {
// some error handling hear
return;
}
fwrite($fh, print_r($posted, true) . “\n”);[/code]
In Ver 3.0 and earlier the response in the logging file looks like:
Array
(
[tr_id] => 24858
[tr_text] => New item
[tr_pid] => 24238
[tr_order] => 1
[!nativeeditor_status] => updated
)
In V4.1 the posted array looks like:
Array
(
[editing] => true
)
How is it possible to process the data in V4?
gloworm