I am currently working on a script to read all the data from a listbox and populate a textbox with those values. I initially attempted to use a for loop for this task, but it seems to be running only once and then stopping.
var listbox = $('#<%=listBox.ClientID%>');
for (var count = 0 ; count <= $('#<%=listBox.ClientID%>').length; count++) {
var existing = $('#<%=stringTextBox.ClientID%>').val();
var value = listbox[count].value;
document.getElementById("<%=stringTextBox.ClientID%>").value = "," + value + existing
}