Here's what your code would look like if changed as suggested:
beforecreate: function(node,targetNode,type,to) {
jQuery.ajax({
url: 'http://example.com/catalog/create/'
+ targetNode.id
+ '?name='
+ encode(to.inp[0].value),
success: function(result) {
if(result.isOk == false)
alert(result.message);
},
async: false
});
}
No comments:
Post a Comment