Retaining select box based values on page refresh
<p>I have one form where in select box in which I have two options "oui" and "non":</p>

<ul>
<li>When "oui" is selected "hello" is displayed</li>
<li>When "non" is selected "not valid" is displayed</li>
</ul>

<p>My problem is when I refresh page after submitting form, "oui" or "non" is properly selected but not the value based on it like "hello" or "not valid"</p>

<p>here is some code</p>

<pre><code>&lt;p&gt;choose option: &lt;select name="opt" class="slct"&gt;
    &lt;option value="0" selected="selected"&gt;--&lt;/option&gt;
    &lt;option value="oui"&gt;Oui&lt;/option&gt;
    &lt;option value="non"&gt;Non&lt;/option&gt;
    &lt;/select&gt;
&lt;/p&gt;
&lt;div id="oui" class="brandDiv"&gt;
  hello
&lt;/div&gt;
&lt;div id="non" class="brandDiv"&gt;
  not valid
&lt;/div&gt;
</code></pre>

<p>and the jquery</p>

<pre><code>function showhide() {
$("div.brandDiv").hide();
$("select.slct").bind('change', function() {
    $('div.brandDiv').hide();
    var targetId = $(this).val();
    $('div#' + targetId).show();
});
}
</code></pre>

<p>Thank you all in advance.</p>
