Skip to content
Advertisement

Drop down when select the option from ajax another input field appear

Hi i needed some help where if i select a drop down and select from ajax option and a hidden input field appear how can i do it ?

JavaScript

This is my ajax

JavaScript

and this is my ajax response

JavaScript

Where say if i select Price By Recyclables the hidden drop down list appear how can i do it ?

Advertisement

Answer

You can use the onchange event to trigger a check and if the user selected the value you want, then display the selectbox. You’d have to add an id to the div with the hidden prop (divToDisplay).

JavaScript
Advertisement