Hello,
i have add dynatree to my index.html and now i want to get the active treenode.
in JavaScript, the following snippet works for me:
now i want to do the same in a B4J-WebApp (Websocket).
I get the click-event and execute the following EvalWithResult():
(DynaTree.Id contains the correct value #dynatree)
... but unfortunately Tree.Value is always null.
My Question: is my EvalWithResult()-Call correct? I didn't find an example how to use it.
Thanks in advance & Greetings ... Peter
i have add dynatree to my index.html and now i want to get the active treenode.
in JavaScript, the following snippet works for me:
B4X:
$( "#myButton" ).on( "click", function() {
var tree = $("#dynatree").dynatree('getTree');
var activeNode = tree.getActiveNode();
alert(activeNode);
});
now i want to do the same in a B4J-WebApp (Websocket).
I get the click-event and execute the following EvalWithResult():
B4X:
Dim Tree As Future = _
WS.EvalWithResult("$(arguments[0]).dynatree('getTree')", _
Array As Object(DynaTree.Id))
Log("Tree: " & Tree.Value)
(DynaTree.Id contains the correct value #dynatree)
... but unfortunately Tree.Value is always null.
My Question: is my EvalWithResult()-Call correct? I didn't find an example how to use it.
Thanks in advance & Greetings ... Peter