KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I'm trying to pass a JavaScript variable to the server-side using jquery.ajax method. I'm trying to create a json string, but when the length of variable reaches 10000, no more data is appended to the string. var jsonObj = '{"code":"' + code + '","defaultfile":"' + defaultfile + '","filename":"' + currentFile + '","lstResDef":['; $.each(keys, function(i, item) { i = i + 1; var value = $("#value" + i).val(); var value = value.replace(/"/g, "\\\""); jsonObj = jsonObj + '{'; jsonObj = jsonObj + '"Key":' + '"' + Encoder.htmlEncode($(this).html()) + '"' + "," + '"Value"' + ':' + '"' + Encoder.htmlEncode(value) + '"'; jsonObj = jsonObj + '},'; alert(jsonObj); }); jsonObj = jsonObj + ']}'; Here, when the character length of the var jsonObj is 10000, the values following that is not appended. It looks like there is some limit about that.
Tags (comma-separated)
Save Edits
Cancel