I am using javascript remoting to get data from apex method.

My problem is javascript remoting is working Asynchronously.I want to work it as synchronously.

Please suggest me.

2 Answers 2


By definition, VF remoting (like AJAX) is asyncrhonous. As the official documentation states "The remote method call executes synchronously, but it doesn’t wait for the response to return. When the response returns, the callback function handles it asynchronously."

This link would help explain how to use the associated parameters when firing a remoting call -

Depending on what your exact use case is, you may want to handle the behavior appropriately in your callback function.


Use the below format

                function(result, event){
                    if (event.status) {
                   //all code after remote controller will be here

                {escape: true}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .