Filter Dropdown menu item by value

There is a text box (input some text) and a drop down menu. When the text box value changes, the value can match a certain part of a value ( ) of the drop down menu item.

When text box value changed drop-down menu should filter the relevant Item and it should be in status, “selected”. How to do this?

I recommend that instead of potentially reinventing the wheel over the course of several months, that you investigate several of the search select box plugins that are already available.

1 Like

These all plugins are to search the text between “option” tags. That means those search for following text in Italic and Bold.
< option value = “select2-Item1-result-rqgy-/0/1000.00/002/000003054/1234567890”
> TEXT < / option >

But I want to filter something inside the opening option tag called “value”. it is --> select2-Item1-result-rqgy-/0/1000.00/002/000003054/1234567890

That can be as easy as changing option.innerHTML to option.value instead at one place of the code. That’s no real problem.

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.