Ken
unread,Sep 2, 2011, 1:10:19 PM9/2/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Discuss jquery.dynatree.js
I would like to test for the failure of the Ajax call in initAjax. I
first tried this:
$("#tree").dynatree({
initAjax: {url: "/getAllNamespaces.app",
success: function(node) {
console.log("initAjax.success... ");
},
error: function(node, XMLHttpRequest, textStatus,
errorThrown) {
console.log("initAjax.error... ");
},
},
...etc
This results in the message:
Uncaught TypeError: Object Dynatree 'tree' has no method 'logError'
jquery.dynatree.js:2227
When I look at that line of dynatree code I see:
if( ajaxOpts.success ){
this.logError("initAjax: success callback is ignored; use
onPostInit instead.");
}
And similar code for error.
So I understand that I should use onPostInit instead of success and
error.
Question 1: Where is logError defined?
Question 2: How do I get useful information within my implementation
of onPostInit about the failure?
I'm interested in the information available to the normal error method
such as textStatus and errorThrown.