Hi All,
I have been fighting with my first application which uses JQuery (jsTree) and Json.
I thought everything was going great I was able to get the data from SQL server convert to Json but now all the data just fills the page and is not in a Treeview.
please let me know drop a solution for me.
instead of that i got the below error,
JavaScript runtime error: Syntax error, unrecognized expression: [{"caption":"&Master"},{"caption":"&Sales"}]
My code is :
<script type="text/javascript">
$(function ()
{
$('#jstree2').jstree({'plugins':["defaults","checkbox"], 'core' :
{
"themes":{
"responsive":true
},
"data": {
type: "POST",
url: "Default.aspx",
contentType: "application/json; charset=utf-8",
datatype:"json",
success: function (data) {
data.d;
$(data).each(function () {
return { "id": this.id };
});
}
}
}
}
);
});
</script>
<div id="jstree2" style="margin-top:2em;">
</div>
thanks in advance.
What I have tried:
Not binding to jsTree using jquery?