We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi, I'm using JSON format, but the tree never create in correct form, this is the result of my AJAX call:
[{"text":"Menú", "state":{ "opened":true },"children": [{"text":"Configuración", "state":{ "opened":true }, "children":[{"text":"Usuarios"},{"text":"Grupos"},{"text":"Opciones de menú"}]}]}]
This is the configuration of the tree: $('#container').jstree({ "core" : { "data" : { "url" : "/menust", "dataType" : "json" // needed only if you do not supply JSON headers }, "animation" : 1, "check_callback" : true, "html_titles" : true, "load_open" : true, "themes" : { "variant" : "large" } }, "plugins" : ["changed"] });
this is my web page:
function createJSTrees(jsonData) { $('#container').jstree({ "core" : { "data" : { "url" : "/menust", "dataType" : "json" // needed only if you do not supply JSON headers }, "animation" : 1, "check_callback" : true, "html_titles" : true, "load_open" : true, "themes" : { "variant" : "large" } }, "plugins" : ["changed"] }); } </head> <body> <div class="container mt-12"> <div id="container"> </div> </div> </body>
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi, I'm using JSON format, but the tree never create in correct form, this is the result of my AJAX call:
[{"text":"Menú", "state":{ "opened":true },"children": [{"text":"Configuración", "state":{ "opened":true }, "children":[{"text":"Usuarios"},{"text":"Grupos"},{"text":"Opciones de menú"}]}]}]
This is the configuration of the tree:
$('#container').jstree({
"core" : {
"data" : {
"url" : "/menust",
"dataType" : "json" // needed only if you do not supply JSON headers
},
"animation" : 1,
"check_callback" : true,
"html_titles" : true,
"load_open" : true,
"themes" : {
"variant" : "large"
}
},
"plugins" : ["changed"]
});
this is my web page:
<title>Menú</title> <script type="text/javascript" src="../static/js/jquery-3.7.1.js"></script> <script type="text/javascript" src="../static/js/bootstrap.min.js"></script> <script type="text/javascript" src="../static/js/jstree.min.js"></script> <script type="text/javascript" src="../static/js/font.all.js"></script> <script> document.onreadystatechange = function(){ if(document.readyState == "loaded" || document.readyState == "complete"){ const queryString = window.location.search; const urlParams = new URLSearchParams(queryString); var IDG = urlParams.get('IDG'); var data = { idg: IDG }; $.ajax({ url: '/menust', type: 'POST', contentType: 'application/json', data: JSON.stringify(data), success: function (dat) { createJSTrees(dat); }, error: function (xhr) { console.log('error') console.log(xhr) } }); } }The text was updated successfully, but these errors were encountered: