FancyPrairie
Programmer
I have 4 multiselect dropdown listboxes (<select>). The 1st one contains the names of facilites. Then 2nd one contains the names of departments. The 3rd one contains the names of supervisors. And the 4th one contains the names of employees. The values shown in each listbox is dependent on the values selected in the previous listbox. That is, for example, if a specific departemnt is selected, then only supervisors and employees assigned to that department are shown. Note that the employee listbox could contain as many as 6000+ names.
How do I count the number of items selected in each listbox. The code below is too slow. Is there another way?
How do I count the number of items selected in each listbox. The code below is too slow. Is there another way?
Code:
lngCount = 0
for each oChild in lstEmp.children
if (oChild.selected) then lngCount = lngCount + 1
next