lb = document.form.listbox;
hiddenfield = document.form.hidden;
if(hiddenfield.value.length > 0) hiddenfield.value="";
for (i=0;i < lb.length;i++) {
if (!isNaN(lb.options[i].value)) {
if(hiddenfield.value.length > 0)
hiddenfield.value = hiddenfield.value + "," + lb.options[i].value;
else
hiddenfield.value = hiddenfield.value + lb.options[i].value;
}
}
No comments:
Post a Comment