3 Replies Latest reply on Mar 14, 2016 1:41 PM by Stephen Hellyar

    Pass Multiple Values from a Select Box to a Filter Function

    Stephen Hellyar

      Help - JavaScript API

       

      Has anybody played with a multiple select box and the API.

       

      I have found moving a select box to the webpage can improve dashboard responsiveness. So, I know how to pass a single select value to an API function -- for example, showOnly().

       

      But, I am limited to a single value at the moment.

       

      Here's a sample select box that can accept multiple values.   How do you pass the selected values to a showOnly() or like filter?  ...by having the function get the values and not hardwiring them into the function.

       

      <select id="select_a" name="color" multiple>

                    <option selected="selected" class="options">Select desired detail</option>

                 <option value="cars" class="options" >cars</option>      

                  <option value="bikes" class="options">bikes</option>

                 <option value="boats" class="options">boats</option>

                  <option value="trains" class="options">trains</option>

                  <option value="motorrad" class="options">motorrad</option>

                  <option value="rockets" class="options">rockets</option>

                 <option value="big wheels" class="options">big wheels</option>

      </select>