S
Scott
I have the following function below in my ASP that I am
having a problem with, because I'm not that familiar with
javaScript. What I want to know is how can I tell that I
am at the end of my For-Loop, so I can prevent an extra
comma from being appended to lstRescipients variable (line
7)?
1 function getRecipients(){
2 var lstRecipients = "";
3 var lst = document.getElementById
("lstEmails");
4 for(var i=0;i<lst.options.length;i++){
5 //if (lst.options.selected){
6 lstRecipients +=
lst.options.value;
7 lstRecipients += ",";
8 //alert(i);
9 //alert(lstRecipients);
10 //}
11 }
12 return lstRecipients;
13 }
having a problem with, because I'm not that familiar with
javaScript. What I want to know is how can I tell that I
am at the end of my For-Loop, so I can prevent an extra
comma from being appended to lstRescipients variable (line
7)?
1 function getRecipients(){
2 var lstRecipients = "";
3 var lst = document.getElementById
("lstEmails");
4 for(var i=0;i<lst.options.length;i++){
5 //if (lst.options.selected){
6 lstRecipients +=
lst.options.value;
7 lstRecipients += ",";
8 //alert(i);
9 //alert(lstRecipients);
10 //}
11 }
12 return lstRecipients;
13 }