PDA

View Full Version : encode JSON Data and send to server



ektanit
23 Dec 2009, 2:34 PM
Hi, I am trying to encode the JSON DATA(stored in the store) and sending to the server. However I get this message in Firbug saying too much recursion. Can't we do like this ?



store.on('load', saveSession);

function saveSession(store, recordArray, options) {
var urlStr = '/ext/testServlet?action=saveSession&workgroupStore='+Ext.encode(recordArray);
Ext.Ajax.request({
url: urlStr,
success: function(response) {
//do nothing
}
});
}

zhegwood
24 Dec 2009, 11:01 AM
How big is the json string that you're encoding? I've run into this problem with huge json objects before... Basically it's running through the regex and kicking off the browser's recursive script alert.