Note that there are some explanatory texts on larger screens.

plurals
  1. POHow do I determine if different sections of a checkbox dropdown menu are selected?
    primarykey
    data
    text
    <p>I have a multiselect dropdown menu where each option has a checkbox and more than one option can be selected at once. I'm using a jQuery multiSelect plugin generate the dropdown. </p> <pre><code>&lt;select id="types" multiple="multiple" size="5"&gt; &lt;option value=""&gt;Show All&lt;/option&gt; @{ &lt;option value="Gains"&gt;Gains&lt;/option&gt; &lt;option value="Losses"&gt;Losses&lt;/option&gt; &lt;option value="Adjustments"&gt;Adjustments&lt;/option&gt; &lt;option value="Future"&gt;Future&lt;/option&gt; &lt;option value="Deliveries"&gt;Deliveries&lt;/option&gt; &lt;option value="Recoveries"&gt;Recoveries&lt;/option&gt; &lt;option value="Full Payout"&gt;Full Payout&lt;/option&gt; &lt;option value="Early Payout"&gt;Early Payout&lt;/option&gt; &lt;option value="Charge Offs"&gt;Charge Offs&lt;/option&gt; &lt;option value="Returns"&gt;Returns&lt;/option&gt; &lt;option value="Transfers"&gt;Transfers&lt;/option&gt; &lt;option value="Ins. Write-offs"&gt;Ins. Write-offs&lt;/option&gt; } &lt;/select&gt; </code></pre> <p>What I need to be able to do is separate the options into 2 sections. The first 4 in a section and the last 8 in a section. If an option is selected in one section, then any options that are selected in the other section are then unselected. This is already setup in a C# .NET application. I am having to replicate the functionality. I don't have access to the .NET code. At first I thought maybe I could put the different options into separate divs and just check whether an option was selected in each div but I get validation errors when I try to do that. I'm not really sure what else I could try. Any help with this would be great. Thanks.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload