| Page 1 of 1 | [ 4 posts ] |
|
I'm having a problem with JSON and XHR.
send data to server with FROM SUBMIT CODE: var sUrl = "<%= request.getContextPath() %>/master/jsonKsmst400.do?command=excel"; var jsonAllRecord = YAHOO.lang.JSON.stringify(liveDataList); var formObject = document.getElementById('aform'); var ohide = document.getElementById('hideData'); ohide.value = jsonAllRecord; formObject.action = sUrl; formObject.submit(); use this way , server can get whole data. the data's count is 164160. and it works!! send data to server with XHR CODE: var jsonAllRecord = YAHOO.lang.JSON.stringify(liveDataList); var postData = "excelData=" + jsonAllRecord; var sUrl = "<%= request.getContextPath() %>/master/jsonKsmst400.do?command=excel"; var request = YAHOO.util.Connect.asyncRequest('POST', sUrl, callback, postData); use this way , server get part of data. the data's count is 84130. and it has error!! erroe msg is : net.sf.json.JSONException: Unterminated string at character 84970 of How can i do ? |
|
I would suggest you install Wireshark (http://www.wireshark.org/download.html) on your client PC and use it to compare the http requests being sent in both cases. That might offer some clue.
|
|
Hi,Peter Foti,thanks for your help!!
|
|
Hi,
Use this tool to find the sent data is ok. By the way , use XHR send 100 records there is no problem.When i use XHR send 1500 records there is error. anyone konws? please help me,Thanks. |
| Page 1 of 1 | [ 4 posts ] |
| You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum |
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info
Powered by phpBB® Forum Software © phpBB Group