Click to See Complete Forum and Search --> : Show/Hide items in a list-box
Caliban
05-24-2003, 12:38 PM
Hi,
I need to know how to hide/show items in a list-box. Is there any property which lets me solve this issue?
If you have some suggestions, I'll appreciate them.
T.I.A.
Nevermore
05-24-2003, 12:45 PM
It is possible to remove items from a list box. Would that do?
Caliban
05-24-2003, 01:06 PM
Hi Dave,
That's exactly the way I'm doing it at this moment. If you say it's not possible ... well ... :( ... OK.
Thanx
khalidali63
05-24-2003, 02:15 PM
style="visibility:hidden;"
in an <option> element
This causes irrational behavior in NS6+
In NS6+ it hides the options which seems logical because thats what it should do,however it retains the empty space for that option.
The best behavior could have been if it hid the option as well as removed the empty space from the collection of options.
IE and opera do not honor
style="visibility:hidden;"
which to some extent makes more sense.
For once I think IE and Opera(an IE impersonator..*_*) is winner at least for this issue,
The best and most logical struxture to get this done sure is removing or adding an option to the collection.
using
new Option(text,value)
or
options[index].value=value
options[index].text=value