JavaScript / Jquery call controller synchroneousely -
i need synchronously call controller (url) in javascript. ajax function so:
$.ajax({ type: 'post', url: base + '/publication/storeworldcat', data: data, success: success, datatype: datatype, async:false });
i don't understand why should use ajax function async:false
parameter ajax asynchronous definition. $post()
asynchronous too.
is there better way?
thanks help!
looking @ the documentation of jquery.ajax
(quoting) :
by default, requests sent asynchronously (i.e. set
true
default). if need synchronous requests, set optionfalse
.
Comments
Post a Comment