From c8b44fd5ef83ea11513bf135ab864040ad891db6 Mon Sep 17 00:00:00 2001 From: Fabio Bas Date: Thu, 28 Nov 2013 13:29:43 +0100 Subject: readded the ability to get a simple result from an ajax callback --- framework/Web/Javascripts/source/prado/activecontrols/ajax3.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/framework/Web/Javascripts/source/prado/activecontrols/ajax3.js b/framework/Web/Javascripts/source/prado/activecontrols/ajax3.js index 8839c1ae..0d306a89 100644 --- a/framework/Web/Javascripts/source/prado/activecontrols/ajax3.js +++ b/framework/Web/Javascripts/source/prado/activecontrols/ajax3.js @@ -315,7 +315,13 @@ Prado.CallbackRequest = jQuery.klass(Prado.PostBack, this.data = data; if (this.options.onSuccess) - this.options.onSuccess(this,textStatus); + { + var customData=this.extractContent(Prado.CallbackRequestManager.DATA_HEADER); + if (typeof(customData) == "string" && customData.length > 0) + customData = jQuery.parseJSON(customData); + + this.options.onSuccess(this,customData); + } var redirectUrl = this.extractContent(Prado.CallbackRequestManager.REDIRECT_HEADER); if (redirectUrl) -- cgit v1.2.3