Removing duplicates from a select dropdown using javascript or jquery
<p>I have a select dropdown field that is being created dynamically from a database based on locations. Due to the way this is being created it results in the dropdown having duplicate locations listed.</p>

<pre><code>&lt;label for="club_feed_town"&gt;Location:&lt;/label&gt;
&lt;select id="locationList" name="club_feed_town"&gt;
    &lt;option value=""&gt;All Locations&lt;/option&gt;
    &lt;option value="Andover"&gt;Andover&lt;/option&gt;
    &lt;option value="Andover"&gt;Andover&lt;/option&gt;
    &lt;option value="Bishops waltham"&gt;Bishops waltham&lt;/option&gt;
    &lt;option value="Blandford forum"&gt;Blandford forum&lt;/option&gt;
    &lt;option value="Boscombe"&gt;Boscombe&lt;/option&gt;
    &lt;option value="Bournemouth"&gt;Bournemouth&lt;/option&gt;
    &lt;option value="Bournemouth"&gt;Bournemouth&lt;/option&gt;
    &lt;option value="Etc"&gt;Etc&lt;/option&gt;
&lt;/select&gt;
</code></pre>

<p>Does anyone know if there is a way to use some code on the page which checks the dropdown for duplicates and removes any duplicates from the menu?</p>

<p>Thanks in advance,</p>

<p>Tom</p>