Login Register

construct tree from database information dynamically

Hi master,

I have a problem to retrieve information from database to construct a tree. Below is my code which point to physical file to construct a tree and it works fine. I have construct a json format with javascirpt and it works when i pasted the information into the file that i harded.[URL parameter was hard coded to that particular json file]. How can i constructe a tree dynamically with database information.

javascript
var jsonForm = "{identifier: 'packageID',label: 'packageName',items:"+getJsonAcc1+"}";

JSP

url="json/mxsConfwip.json">

Thanks in advance.