Skip to content
Advertisement

First Dropdown Changes Second Dropdown Related Item display

Hi I have two dropdowns in my Html when I select my dropdown. my second dropdown needs to change related items. My dropdown one has two item Domestic, international second dropdown has three item INR, USD, EUR

When I change my first dropdown Domestic item selected need to display in my second dropdown INR Item only display other item need to hide. Then I select an international item in my first dropdown that needs to display in my second dropdown USD, and EUR currency only displays. how to achieve it. (using jquery or javascript). My code below here.

JavaScript

My Jquery function

JavaScript

i not getting correct value in my UI please answer me.

Advertisement

Answer

Here is a working demo you could follow:

JavaScript

A JSFiddle you could check: https://jsfiddle.net/b6pe3vxq/

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement