Submit form on selection of dropdown item

Submit form on selection of dropdown item
This example code addresses a popular need to have a form submitted on the selection of a value from a dropdown control.
<form>
<select name="selBoroughs" onChange="this.form.submit();">
        <option value="Manhattan">Manhattan</option>
        <option value="Queens">Queens</option>
        <option value="Brooklyn">Brooklyn</option>
        <option value="Bronx">Bronx</option>
        <option value="Staten Island">Staten Island</option>
</select>
</form>

Leave a Reply

Your email address will not be published. Required fields are marked *

Back To Top