简体   繁体   中英

Get Dynatree marked items from $_POST in PHP

I'm using dynatree plugin but when I do:

print_r($_POST);

in the page where I receive the data I can't see Dynatree selected options? Why? How I can get this data in order to process it in my PHP script?

Ok, after found this topic and change a bit of code I made it to works. This is the result:

$(".btn").click(function() {
        var tree = $("#tree").dynatree("getTree");
        var selKeys = $.map(tree.getSelectedNodes(), function(node) {
            return node.data.key;
        })

        $("#selcs").val(selKeys);
});

Hope can help others

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM