0

I have 12 boxes, when I click each of the boxes, it pops out the modal dialog, Each of the modal dialog contains same dropdown box (same class name, same id, same name)for Eg. Country Dropdown selection.

When I choose the USA in the first box pop out drop down box, the selected value USA needs to get selected in the remaining 11 boxes pop out drop down box.

I am using HTML, javascript, jQuery and PHP.

Please kindly help some one using the above language or script to achieve this.

Thanks in advance.

3
  • I'm a little confused. Can you show the code you have? Commented Mar 1, 2013 at 5:32
  • 12boxes means..this also in dropdown or...? Commented Mar 1, 2013 at 5:32
  • link Please check the dropdown boxes here. All the same set of 12 dropdown boxes in the same page. But, Only one dropdown box used for the one box. If I choose the some value in the first dropdown box, the selected value needs to get update in the other dropdown boxes also. Commented Mar 1, 2013 at 6:02

1 Answer 1

1

apply same class to all select boxes then do

 $(document).ready(function(){

 $('.west-yorkshire').change(function(){

      var value = $(this).val();
     $('.west-yorkshire').each(function(){
       $(this).val(value);
     });
 });
 });
Sign up to request clarification or add additional context in comments.

8 Comments

Hi, Thank you for your reply. But I've tried it here. It's not working for me. Can you please help me to solve? Tried in JSFiddle. Please check it. If the value selected in the first dropdown box, then the selected value needs to get update in the other 2 dropdown boxes also.
i saw some mistakes in you code.I corrected that code.you can use the above code.
I think If you updated the code, then the link use to change. So can you re-post the link?
i dont know how to use jsfiddle.
Hi, Thanks a lot :). Can you do one more help?
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.