Hi,
I want to read text file content line by line from a YUI widget using an Ajax request.
Everything works fine except that line breaks are removed from server response. Code is added below.
Any advice to preserve line breaks in the text response ?
<code>
Alfresco.util.Ajax.request({
url: Alfresco.constants.PROXY_URI + "slingshot/node/content/workspace/SpacesStore/xxxxxxxxxxxxxxxxx",
successCallback: {
fn: function _getFileContent_success(p_response) {
var fileItems = (p_response.serverResponse.responseText).split("");
.... process lines .......
},
scope: this
},
failureCallback: {
fn: function _getFileContent_failure(p_response) {
console.log("Error, unable to get file content: " + p_response);
},
scope: this
}
});
</code>
Thanks.