javascript - Any existing script or library that already can handle multiple selections from multiple select box? -
i trying create search function there 3 select boxes ( tags) a) country b) region c) city. when select country (e.g. australia), region select box filled regions australia. (e.g. queensland, tasmania, , etc.)
i have found library called select2 (http://ivaynberg.github.io/select2/) easier search , select value compare traditional .
but problem need allow user search following examples:
scenario 1: select multiple countries. e.g. australia, usa, brazil, singapore
scenario 2: select multiple countries, regions e.g. usa, brazil, singapore, queensland (australia), victoria (australia) (when have selected region, can ignore country value)
scenario 3: select multiple countries, regions, , cities e.g. brazil, singapore, queensland (australia), victoria (australia), new york city (usa), washington (usa) (when have selected region, can ignore country value, when have selected city, can ignore region , country value)
not sure scenario 2, 3 make sense? in other words, when have selected city or region don't need pass country or region value server.
i hoping not spend time reinvent wheel here, there library/script (e.g. select2) can handle scenarios above?
Comments
Post a Comment