title: Changing one dropdownlist's selected value based on another dropdownlist's selection
body: <p>We have a user information form that among other things, asks for the user's address country (dropdownlist1), the user's phone number country (dropdownlist2) and fax number country (dropdownlist3).  We would like to have the form update so that when the user selects their address country(1), the other two country dropdownlists (2 &amp; 3) update to the first list's selected country.</p>
  
  <p>Our site is a C# MVC site.</p>
  
  <p>The existing code on the form (from our implementation partner) uses a script to update the fields (it doesn't successfully - they just go blank).</p>
  
  <p>In the view cshtml file:</p>
  
  <pre><code>$(function () {
  
      $('#Country').change(function () {
          var $country = $(this);
          var country = $country.val();
  
          var selectedValues = new Array();
          selectedValues[0] = country;
          selectedValues[1] = country;
  
          $('#PhoneCountry').val(selectedValues);
          $('#FaxCountry').val(selectedValues);
  
      });
  
  });
  </code></pre>
  
  <p>I know the script itself runs - there are some other components to it that I have removed to simplify the script to ask this question, and those parts work as expected.</p>
  
  <p>One of the challenges we have is the first dropdownlist, for the address country, has the country name as both value and text, while the phone and fax dropdownlists use a GUID as the value, and the country as the text.  As near as I can tell, we would need to use the SelectedText value to try to change the two phone dropdownlists, but I can't figure out the code to get it to work.</p>
  
  <p>I have tried permutations including</p>
  
  <p>var selectedText = country;<br>
  $('#PhoneCountry').SelectedText(selectedText);</p>
  
  <p>and</p>
  
  <p>var selectedText = country;<br>
  $('#PhoneCountry').val(selectedText);</p>
  
  <p>which failed.</p>
  
  <p>I have even hard coded various options into the script, just to try to figure out what combination of information WOULD successfully update the two phone dropdownlists, but even that has failed.</p>
  
  <p>Any advice/input would be greatly appreciated!</p>