jsbeans.Select
back to jsbeans index
jsbeans.Select
let you manage options of an HTML select object.
Dependant options
This method let you manage the scenario when options of a select depend from a selected option of another select.
Parent select
:
first (value=1)
second (value=2)
third (value=ciccio)
Dependant select
:
Something 1 (depends on first)
Something 2 (depends on first)
Something 3 (depends on first and second)
Something 4 (depends on second)
Something 5 (depends on first and third)
Something 6 (depends on second and third)
Something 7 (depends on first, second and third)
Something 8 (depends on first and third)
Empty value (depends on third)
Ordering options
This method can be both static or not, but in both cases let you order select's options by value.
Class method (static)
Case sensitive
:
Noè
Abramo
Isaia
Ezechiele
abramo II
Instance method
Case sensitive
:
Non avrai altro Dio all'infuori di me
Non rubare
non desiderare la donna d'altri
Onora tuo padre e tua madre
Non uccidere
Non commettere atti impuri
Ricordati di santificare le feste
Non desiderare la roba d'altri
Non dire falsa testimonianza
Source/destination selects
A simple way to switch options between two selects. Final result can be ordered or just appended.
left 1
left 3
left 2
Ordering only source select
NO ordering
right 1
right 2
right 3
Remove selected
A simple method to remove selected options.
AAA
BBB
CCC
DDD
EEE
FFF
Minimum/maximum
A method to retrieve an option (as DOM object) whose text has a minimum or maximum string based on
natural ordering
.
First option
A second option
Guess what? Third option!
Another text
Filtering
A simple way to dinamically filter options from a select.
!DOCTYPE
a
abbr
acronym
address
applet
area
b
base
basefont
bdo
big
blockquote
body
br
button
caption
center
cite
code
col
colgroup
dd
del
dfn
dir
div
dl
dt
em
fieldset
font
form
frame
frameset
head
h1 - h6
hr
html
i
iframe
img
input
ins
kbd
label
legend
li
link
map
menu
meta
noframes
noscript
object
ol
optgroup
option
p
param
pre
q
s
samp
script
select
small
span
strike
strong
style
sub
sup
table
tbody
td
textarea
tfoot
th
thead
title
tr
tt
u
ul
var
delete hidden objects created by
jsbeans.Select.filter