X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/6e39d509471fe9b4e2660e0d1631b350d0c66f40..2e847cf21b8ab9d15fa167b315ca5b2fa92638fc:/src/data/ScriptTagProxy.js diff --git a/src/data/ScriptTagProxy.js b/src/data/ScriptTagProxy.js index a8f9e502..ea7c0368 100644 --- a/src/data/ScriptTagProxy.js +++ b/src/data/ScriptTagProxy.js @@ -1,6 +1,6 @@ /*! - * Ext JS Library 3.1.0 - * Copyright(c) 2006-2009 Ext JS, LLC + * Ext JS Library 3.1.1 + * Copyright(c) 2006-2010 Ext JS, LLC * licensing@extjs.com * http://www.extjs.com/license */ @@ -53,6 +53,17 @@ if ($callback) { header('Content-Type: application/x-json'); echo json_encode($output); } + + *

Below is the ASP.Net code to do the same thing:


+String jsonString = "{success: true}";
+String cb = Request.Params.Get("callback");
+String responseString = "";
+if (!String.IsNullOrEmpty(cb)) {
+    responseString = cb + "(" + jsonString + ")";
+} else {
+    responseString = jsonString;
+}
+Response.Write(responseString);
 
* * @constructor