title: Populate chained select menu
body: <p>I am working on a chained select menu, which you can see here - <a href="http://jsfiddle.net/stocktrader/EhUKJ/" rel="nofollow">http://jsfiddle.net/stocktrader/EhUKJ/</a>. I have it coded so that the "country" selection changes the "state/zip/city" options via show/hide. All of that is working well. </p>
  
  <p>But my problems is that this form is also used for updating this information for each person. And when I populate the form with current data, I can't get the correct show/hide settings to trigger based on the country setting. You can see an example in the current fiddle where I pre-selected "United States", but the "city/state/zip" options don't come up. The DO come up if you click to a different country and then back on.</p>
  
  <p>I attempted to write some JavaScript that would change the populated show/hide settings by retrieving the "country" value but I don't know JavaScript at all. I tried the below code, which is in the fiddle, but I doubt it is even close.</p>
  
  <pre><code>var s = document.getElementById('country');
  var item1 = s.options[s.selectedIndex].value;
  function cty()
  {
      if (item1 == 'group1')
      unhide('.group1_opts');
  }
  </code></pre>