Click here to Skip to main content
15,908,581 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi
I have two selectbox , and when i select option in one selextbox , i want to add option in other select box .

if i select 2 as value in one select box , i want to add 2 options to other select box..
and if i select 0 as value in one select box , i want to remove all options in other select box

pls give example in jquery


maulik shah


I have tried as

SQL
on first select box change function,

if value of first box is small then second select box selected value ,
i use

       var evalue = $("#childid :first-child").attr("value");
  $("#childid option[value='"+evalue+"']").prop('selected',true);


i hope u understood
Posted
Comments
Sergey Alexandrovich Kryukov 10-Mar-14 0:50am    
Please stop posting fake "answers". This is considered as abuse.
—SA
maulikshah1990 10-Mar-14 0:52am    
i m not abusing..just added solution which worked for me...
why u taught that i m abusing..this is not way to reply...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900