title: How do you set the default value of a drop down list that is being called via AJAX from another page?
body: <p>For my code, my drop down lists are initiated on the original page, via</p>
  
  <pre><code>&lt;select name =country id=country 
  onchange=showRecords(this.value,'country','province')&gt;"
  </code></pre>
  
  <p>This function is taking the value, equating it to country, then querying MySQL, and setting the results where id=province, and creating cascading dropdown lists. This is obviously via Ajax.</p>
  
  <p>So, when $_REQUEST['province'] is set, then the Province dropdown list gets populated with all provinces from the country to which it belongs, etc.; i.e.;</p>
  
  <pre><code>&lt;?if(isset($province)){
  echo "&lt;script&gt;showRecords('".$country."','country','province');&lt;/script&gt;";}?&gt;
  </code></pre>
  
  <p>However, for the life of me, I cannot figure out how I can set the default value equal to $_REQUEST['province']. I cannot use the traditional way:</p>
  
  <pre><code>if (($selected) == ($value)) {
   $options.= " selected";
   }
  </code></pre>
  
  <p>Because it is querying the AJAX page with one piece of information at a time.</p>
  
  <p>Any ideas would be greatly appreciated.</p>