I am entering values in a List using ClientContext. The list has around 70 columns.
I get an error at Executequeryasync in Chrome but works fine in IE. I am able to submit in the list from IE.
I removed the below section of codes around 25, then I am able to submit in chrome.
function createListItem() {
context = SP.ClientContext.get_current();
var airportList = context.get_web().get_lists().getByTitle(listTitle);
var listItemCreationInformation = new SP.ListItemCreationInformation();
var listItem = airportList.addItem(listItemCreationInformation);
listItem.set_item('Column1', document.getElementById("txtarea_cmt1").value);
listItem.set_item('Column67', document.getElementById("txtarea_cmt67").value);
ListItem.update();
clientContext.load(ListItem);
clientContext.executeQueryAsync(Function.createDelegate(this, this.onQuerySucceeded), Function.createDelegate(this, this.onQueryFailed));
}
function onQuerySucceeded() {
alert('Item created: ' + oListItem.get_id());
}
function onQueryFailed(sender, args) {
alert('Request failed. ' + args.get_message() + '\n' + args.get_stackTrace());
}
When i enter all 67 columns it gives error : "Request Failed. Unexpected response from server. The status code of response is 0. The status text of respose is ''.null". It works when when i enter around 55 columns. [Note : There is no reload happening on submit button.]
This is because of the column not having proper data
. I'll suggest you to categorize your fields based on type. All the text fields at one place followed by choice, followed by yes/no etc. etc. In this way you can identify from which column type is causing you problem.