This loop works 100% fine:
for(m = 1; m < splitData.length; m++)
This one however throws errors! (Relating to loop body)
for(m = splitData.length; m > 1; m--)
The entire chunk of code is:
// Success
if (splitData[0] == "1") {
// DbID, username, msg, date
for(m = splitData.length; m > 1; m--){
var splitMsg = splitData[m].split("¬");
$('#<%=discussionBoard.ClientID %>').prepend('<div class="messageWrapper">
<div class="messageHead">' + splitMsg[1] + '</div>
<div class="messageTxt">' + splitMsg[2] +
'<div class="messageDetails">' + splitMsg[3] +
'</div></div></div>');
}
The first index in splitData is just a 1 or 0 indicating if Ajax returned good data. I then want to loop through the rest of the input.