Fiddling a little, and hard-coding the list name in:
//Add field: Score
var newFields = "<Fields>";
for(i=1; i <= 100; i++) {
newFields += "<Method ID='" + i + "'>" +
"<Field Type='Text' DisplayName='Column_" + i + "' FromBaseType='TRUE' MaxLength='255' Description='Description of Column_" + i + "' />" +
"</Method>";
}
newFields += "</Fields>";
// Add a lot of columns to the list
$().SPServices({
operation: "UpdateList",
listName: 'test1',
newFields: newFields,
completefunc: function (xData, Status) {
alert(Status);
alert(xData.responseText);
}
});
Gives me an error saying the list doesn't exist. Then the second time it looks like it works but doesn't create the column :'(