From a4d80ad8276a8eadb81b9c56a61c3be2cd1453d5 Mon Sep 17 00:00:00 2001 From: inpos Date: Thu, 16 Aug 2018 20:13:19 +0300 Subject: [PATCH] sync call ajax.request --- orun/js.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/orun/js.py b/orun/js.py index 3a9cbfd..55e571a 100644 --- a/orun/js.py +++ b/orun/js.py @@ -34,17 +34,17 @@ def js_procedure(func_id, ajax_args=''): def js_function(func_id, ajax_args=''): return ''' - var ajax_result; - Ext.Ajax.request( + var response = Ext.Ajax.request( { url: '%s', method: 'GET', + async: false, params: { fn: %d%s }, - success: function () { ajax_result = JSON.parse(arguments[0].responseText); } } ); + var ajax_result = JSON.parse(response.responseText); return ajax_result.data; ''' % ( AJAX_FUNC_URL,