---
title: "How to call function synchronously"  
description: "How to call function synchronously"  
author: "ravindra nalwaya"  
published: 2014-10-30  
updated: 2014-10-30  
canonical: https://www.mindstick.com/forum/2462/how-to-call-function-synchronously  
category: "sencha touch"  
tags: ["sencha touch"]  
reading_time: 1 minute  

---

# How to call function synchronously

Hi [Developers](https://www.mindstick.com/articles/12875/blunders-you-must-avoid-while-hiring-java-developers-to-get-the-best-fulfilling-your-needs),Can [anyone help me](https://www.mindstick.com/forum/331/can-anyone-help-me-out-how-to-use-session-concept) to call [function](https://www.mindstick.com/articles/13001/multi-statement-table-valued-user-defined-function-in-sql-server) synchronously using [sencha touch](https://www.mindstick.com/interview/23004/define-class-system-of-sencha-touch). Function should complete all the statement it contains.

## Replies

### Reply by Sumit Kesarwani

Hi Ravindra, \
Below is the sample code to call the function synchronously, just set false in async.\

```
Ext.Ajax.request({	url: 'your page',	method: 'POST',	success: success,	failure: failure,	scope: this,	params: {foo: 'bar'},	async: false});// or directly ...Ext.lib.Ajax.request('POST', url, callback, params, {async: false});
```


---

Original Source: https://www.mindstick.com/forum/2462/how-to-call-function-synchronously

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
