Question: Hi I would like to transform a combobox into a filtered search field because the combobox is made up of 60 elements and it is difficult to disfil among these 60 elements to find the element that we search. So I think it's simpler to give the user a chance to grab the item he is looking for and the combobox will give him suggestions automatically according to the list.

We will make an example of a combobox with 5 elements. Here's my code

```
<select name="example">
    <option value="A">A</option>
    <option value="B">A</option>
    <option value="C">C</option>
    <option value="D">D</option>
    <option value="E">E</option>
</select>

```

**NOTE:**
I also use bootstrap in case it would be necessary to use it in the code.
Thanks in advance for helping me

Answer: 
and here you go

```js
function searchSelect(searchForID, searchInID) {
    var input = document.getElementById(searchForID).value.toLowerCase();
    var output = document.getElementById(searchInID).options;

    for (var i = 0; i < output.length; i++) {
        if (output[i].text.toLowerCase().indexOf(input) < 0) {
            output[i].style.display = "none";
            output[i].setAttribute('style', 'display:none');

        } else {
            output[i].style.display = "";
            output[i].setAttribute('style', 'display:');
        }
    }
}
```

```css
#widthset{
width=500px;
}
```

```html
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
Search:
<input type="text" size="25" ID="searchFor" onkeyup="searchSelect(this.id,'searchIn')">
<br />
<br />
<div class="widthset">
<select size="6" multiple="multiple" class="form-control" name="searchIn" id="searchIn">
    <option value="A">A</option>
    <option value="B">B</option>
    <option value="C">C</option>
    <option value="D">D</option>
    <option value="E">E</option>
    <option value="F">F</option>
    </select>
    </div>
```

apply CSS on your own
Give some more details. Is it about fetching the data from database or some other online source. or is it just the script. Give some more details in your question. Edit your question.