[Dojo-interest] dojo.rawXhrPost : is there a character (content) limit?
Chris Fleischmann
chris.fleischmann at sun.com
Tue Apr 28 10:34:42 EDT 2009
Folks I have the following code
function _postToApp(jsonParams, saveCompleteCallback, saveFailedCallback) {
console.log("calling the server");
var serverURL = "myURL"
console.log("jsonParams=" + jsonParams);
return dojo.rawXhrPost({
preventCache: true,
url: serverURL,
handleAs: "text",
postData: "items=" + jsonParams,
timeout: 30000,
sync: true,
load: function(data, ioArgs) { // The LOAD function will be
called on a successful response.
console.error("Response: ", response);
var response = dojo.fromJson(data);
return true;
},
error: function(response, ioArgs) { // The ERROR function
will be called in an error case.
console.log("response: " + response);
console.log("ioArgs: " + ioArgs.xhr.status);
// alert("HTTP status code: ", ioArgs.xhr.status);
return false;
}
});
}
To submit content to my backend...
I note however depending on the length of the jsonParams string that it
either fails straight away with dropping in to the above "error" function,
dumping:
response: SyntaxError: missing } after property list
to the console window, or if the content being submitted is shorter it all
works, for example the following content/string works:
jsonParams={"updateData":[{"id":"1","tag":"Message 1","text1":"This is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a test","text2":"SAMPLE TEXT","text3":"SAMPLE
TEXT","text4":"SAMPLE TEXT"},{"id":"2","tag":"Message 2","text1":"SAMPLE
TEXT","text2":"SAMPLE TEXT","text3":"SAMPLE TEXT","text4":"SAMPLE TEXT"}]}
the following (note the longer length) doesn't, again I get the above syntax
error?
jsonParams={"updateData":[{"id":"1","tag":"Message 1","text1":"This is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a testThis is a testThis is a testThis is a testThis is a
testThis is a test","text2":"SAMPLE TEXT","text3":"SAMPLE
TEXT","text4":"SAMPLE TEXT"},{"id":"2","tag":"Message 2","text1":"SAMPLE
TEXT","text2":"SAMPLE TEXT","text3":"SAMPLE TEXT","text4":"SAMPLE TEXT"}]}
your help is greatly apreciated.
I see from my googling that it could be something to do with the 4K textarea
/ cookie limit???
Thanks in advance,
Chris
--
View this message in context: http://www.nabble.com/dojo.rawXhrPost-%3A-is-there-a-character-%28content%29-limit--tp23278361p23278361.html
Sent from the Dojo mailing list archive at Nabble.com.
More information about the Dojo-interest
mailing list