Questions tagged [optgroup]

The OPTGROUP element defines a group of choices within a SELECT menu.

The OPTGROUP element defines a group of choices within a SELECT menu. OPTGROUP must contain one or more OPTION elements to define the actual choice

Example:

<select>
  <optgroup label="Swedish Cars">
    <option value="volvo">Volvo</option>
    <option value="saab">Saab</option>
  </optgroup>
  <optgroup label="German Cars">
    <option value="mercedes">Mercedes</option>
    <option value="audi">Audi</option>
  </optgroup>
</select> 

sources: http://htmlhelp.com/reference/html40/forms/optgroup.html, http://www.w3schools.com/tags/tag_optgroup.asp

259 questions
0
votes
2 answers

Jquery remove selected text on second box

I use erichynds's jquery MultiSelect Plugin to changed to 2-level chained-select-box, however it works perfectly, but there is a little flaw that have to fix so far. Please look for working example here. For instance, I picked option '2' on first…
conmen
  • 2,377
  • 18
  • 68
  • 98
0
votes
1 answer

Matching exactly option and optgroup

I got an issue with following script when the select-options become long: Solution with few options http://jsfiddle.net/hsQjh/5/ Long options with issue: http://jsfiddle.net/hsQjh/6/ My first select-box option is up to 40+ of options, thus the…
conmen
  • 2,377
  • 18
  • 68
  • 98
0
votes
1 answer

Jquery get optgroup label and its childs

How could it get box_B optgroup's label name based on box_A option that is selected? I use following function tried to alert box_A parent label but unable to get it, if I changed to var label = $(e).attr('value');, the option value is show. function…
conmen
  • 2,377
  • 18
  • 68
  • 98
0
votes
1 answer

Jquery hide/show optgroup base on main selector

Please refer to this link , is a multiple select box to select sub-activity base on what is picked in main-activity, its working pretty well now. Based on change request, I want to make the action to show only the optgroup in sub-activity when it…
conmen
  • 2,377
  • 18
  • 68
  • 98
0
votes
1 answer

jQuery optgroup and option value in multiple select box

Please refer to my first question by this link, thanks to @A.V for helpfulness, The script which provided is work great in fact, but there is an issue in the giving name for option value and optgroup, please go http://jsfiddle.net/NZ6tY/7/ for more…
conmen
  • 2,377
  • 18
  • 68
  • 98
0
votes
1 answer

Jquery populate optgroup for second selectbox dynamically

I have a very long list of options in two multiple select box, I want to populate dynamically the options for select_B based on select_A, for instance: I multiple select opt1 and opt2 from select_A, select_B will show the options which is optgroup…
conmen
  • 2,377
  • 18
  • 68
  • 98
0
votes
1 answer

How can I change the selected value of a dropdown list that uses opt groups?

I have a drop down list, which renders on the page like this: