title: Html select option lost data after submit
body: <p>i have two select option with some data:</p>
  
  <pre><code>&lt;select id="S1" name="S1"&gt;
    &lt;option value="id1"&gt;data1&lt;/option&gt;
    &lt;option value="id2"&gt;data2&lt;/option&gt;
    &lt;option value="id3"&gt;data3&lt;/option&gt;
  &lt;/select&gt;
  
  &lt;select id="S2" name="S2"&gt;
    // data for selected value in S1
  &lt;/select&gt;
  </code></pre>
  
  <p>When i choose one option, i make a submit with the data to fill a second select option, but when i do this submit i lost the selected value of the first select option. How can i keep the selected value for the first select?</p>
  
  <p><strong>Update:</strong> i use mod_plsql, that is html languaje in a plsql procedure.</p>
  
  <p>With a cursor i get the data:</p>
  
  <pre><code>CURSOR c_departamento IS
  SELECT *
  FROM sib_s_lugares_geograficos
  WHERE tipo ='DE';
  </code></pre>
  
  <p>And after i fill the select one with a loop:</p>
  
  <pre><code>htp.p(' 
  &lt;select name="opt_departamento" value="'||OPT_DEPARTAMENTO||'" style="width: 135px" &gt;');
  FOR regDep IN c_departamento LOOP
  htp.p(
  '&lt;option selected value="' || regDep.codigo || '"&gt;' || regDep.descripcion || '&lt;/option&gt;');
  END LOOP;
  END IF;
   &lt;/select&gt;');
  </code></pre>
  
  <p>I do the submit because i have another Cursor to get the data for the second select one, when i do the submit, mod_plsql call again the procedure and it paint the html, when it happen I get the correct value for the second select but i lost the value selected for the first.</p>