How to select an option via jquery
<p>I have a select form that looks kind of like this:</p>

<pre><code>&lt;select multiple="multiple" id="id_color_id" name="color_id""&gt;
&lt;option value="1"&gt;Red&lt;/option&gt;
&lt;option value="2"&gt;Blue&lt;/option&gt;
&lt;option value="3"&gt;Brown&lt;/option&gt;
&lt;/select&gt;
</code></pre>

<p>What I want to do is select the item above via javascript. This is actually part of a hidden form, so all I'm trying to do is leverage the serialize part of the form. I'm thinking it will just be easier to hack that after the serialize then to add this as well, but I also want to deselect any options that have already been selected.</p>

<p>So two questions:</p>

<ol>
<li><p>How to select an option via javascript. All I will know is "Red", "Blue" or "Brown". I also have a look up dictionary that can get me the values as well.</p></li>
<li><p>How to deselect all options previous to selecting one of the above.</p></li>
</ol>

<p>This is related to: <a href="http://stackoverflow.com/questions/10715466/selecting-options-in-a-select-via-jquery">Selecting options in a select via JQuery</a></p>
