Question:Which option is correct to perform a synchronous AJAX request? 

A 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); } }); } 

B 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: sync(true) }); } 

C 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 }); } 

D jQuery only allow asynchronous AJAX request. 

+ Answer
+ Report
Total Preview: 784

Copyright © 2024. Powered by Intellect Software Ltd