简体   繁体   中英

How to make a dynatree from sql query results?

I'm trying to make a dynatree for a selection of overlays for googlemaps. screenshot here: http://i.imgur.com/TgLHEnn.png

Now I'm having trouble making the dynatree's content dynamic. User's should be able to upload these maps and it'd be available to be selected in the tree.

In the screenshot, the tree is working perfectly but its content is static because i declared it in the .js file. Turning the php sql array into the "tree" array is what's puzzling me. Any ideas?

您只需要根据查询结果创建JSON数据或JS数组,就可以根据需要使用ajax或children选项将其设置为树。

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