I want to fill a second treebox with the AJAX response data.
The first tree is perfectly working. Then I do a
"encodeURIComponent(tree.serializeTreeToJSON())"
and send a sync AJAX Post Request.
in my process.php I get the POST value in a right way and then I just do this:
<?php
// just send back
$tree=htmlspecialchars_decode($_POST['tree']);
echo $tree;
?>
The JSON-string in $tree is exactly the same as provided from the DHX function. I proofed it.
And when I hardcode the value of $tree into the
another_tree.loadJSONObject(data);
instead of “data” (look in my javascript down here) everything works fine. I manually proofed it to tested with the JASON-string. And it seems to be well formatted JASON. And it is exactly the same data, the script posted with ajax before.
But If I use the variable “data”, nothing happens. With an “alert(data);” it just says [object OBJECT].
I have the same problem in SAFARI, FF and IE.
What is my mistake? I hope you can help me out of this.
Here my
[code]