From 6fd29b65290509f55172efccaacb5f91a4a884df Mon Sep 17 00:00:00 2001 From: wei <> Date: Sat, 23 Sep 2006 06:40:38 +0000 Subject: Add TJsonService --- framework/Web/Javascripts/js/debug/ajax.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'framework/Web/Javascripts/js/debug') diff --git a/framework/Web/Javascripts/js/debug/ajax.js b/framework/Web/Javascripts/js/debug/ajax.js index 5bd22afa..5acdfb63 100644 --- a/framework/Web/Javascripts/js/debug/ajax.js +++ b/framework/Web/Javascripts/js/debug/ajax.js @@ -302,6 +302,18 @@ Object.extend(Ajax.Request.prototype, if (event == 'Complete') { + if ((this.header('Content-type') || '').match(/^text\/javascript/i)) + { + try + { + json = eval('(' + transport.responseText + ')'); + }catch (e) + { + if(typeof(json) == "string") + json = Prado.CallbackRequest.decode(result); + } + } + try { Prado.CallbackRequest.updatePageState(this,transport); @@ -314,8 +326,6 @@ Object.extend(Ajax.Request.prototype, } catch (e) { this.dispatchException(e); } - if ((this.header('Content-type') || '').match(/^text\/javascript/i)) - this.evalResponse(); } try { -- cgit v1.2.3