ShareThis

Monday, July 30, 2012

How to make $.post() call as synchronous ?

Call this method before $.post :


$.ajaxSetup({async:false});


Alternatively, you could  call $.ajax, which allows more custom parameters:



$.ajax({
  type: 'POST',
  url: url,
  data: data,
  success: success,
  dataType: dataType,
  async:false
});

See a StackOverflow related question



0 comments:

Post a Comment