to see if item in dropdownList has been selected
<p>I would like to know what the best way would be to loop through a dropdown list in html to see if and item has been selected or not.</p>

<p>I know in C# it would be something along the lines of</p>

<pre><code>int selected = cmbFamily.SelectedIndex;

        for (int loop = 0; loop &lt; cmbFamily.Items.Count; loop++)
        {
            if (selected == -1)
            {
                MessageBox.Show("please select an item", "Please", MessageBoxButtons.OK, MessageBoxIcon.Error);
                break;
            }
        }
</code></pre>

<p>how would I go about in doing this with javascript?</p>

<pre><code>&lt;tr style="font-size:12pt; font-weight:bold; color:#FFFFFF; font-family:High Tower Text;"&gt;
                    &lt;td&gt;Family to join:&lt;/td&gt;
                    &lt;td&gt;&lt;select name="drpFamily"&gt;
                        &lt;option/&gt;-select-
                        &lt;option/&gt;Gambino
                        &lt;option/&gt;Genovese
                        &lt;option/&gt;Lucchese
                        &lt;option/&gt;Colombo
                        &lt;option/&gt;Bonanno
                    &lt;/select&gt;&lt;font color="red"&gt;*&lt;/font&gt;&lt;/td&gt;
                &lt;/tr&gt;
</code></pre>

<p>Kind regards
Arian</p>
