-
Notifications
You must be signed in to change notification settings - Fork 768
New issue
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
ajaxURLS call back #22
Comments
Hi @lordzpipo . Literally, this bug implies that the returned data doesn't has "children" property. Are you sure you back-end returns JSON object like the following format:
|
hi @dabeng , |
All right. Thanks for your testing. It seems that it's necessary to set dataType to "json" in file juery.orgchart.js. |
@dabeng why should the node need a 'children' property? if the property isn't there, it should be considered empty. |
hi @dabeng ,
i am trying your plugin, everything run good,
but i found a bug in ajaxURL function
when i call children function, server side return json data,
but the plugin cannot parse the json data on line 541
if (data.children.length)
,if will return
jquery.orgchart.js:541 Uncaught TypeError: Cannot read property 'length' of undefined
and my solution is add
dataType: "JSON"
on line 538like this :
$.ajax({ 'url': opts.ajaxURL.children + nodeId + '/',dataType: "JSON" })
hope help :D
The text was updated successfully, but these errors were encountered: