-
Mutiple selected listbox
I have a multiple select Listbox, I wrote a javascript try to catch those Choice I made, but it does not work.
while (i <= document.myform.lstassignee.count)
{
x=document.myForm
if (x.lstassignee.options[i].selected) {
txt=x.lstAssignee.options[i].text + " " + txt
}
i++
}
Could somebody help??? Thanks very much
-
*grumblegrumble*
Use the code tags.
What kind of error are you getting, or what is var txt being set to?
Also, text and value are two seperate properties. Make sure you are asking for the correct one.
Also, JavaScript is case-sensitive.
And lastly POST JAVASCRIPT QUESTIONS TO THE JAVASCRIPT FORUM!.
-
I can do it through ASP so this may help.
sSelectedItems = Request.form("listboxname")
arrSelectedItems = Split(sSelectedItems, ", ", -1, 1)
For i = LBound(arrSelectedItems) To UBound(arrSelectedItems)
'do what ever you want from here
response.write arrSelectedItems(i)
End if
Next