If you check the jQuery documentation: specify asynchronous option to be false to get synchronous Ajax request.
beforecreate: function (node, targetNode, type, to) { jQuery.ajax({ url: 'http://example.com' + targetNode.id + '?name=' + encode(to.inp[0].value), success: function (result) { if (result.isOk == false) alert(result.message); }, async: false }); }