Combobox within html form tags
I need quick help with the combo box, the script i am using below works perfectly fine until i put the combobox within form tags the autocomplete works fine but the dropdown list automatically submits the form once clicked???
- <form>
- <label>Town: </label>
- <select id="town" name="town">
- <option value="">Select one...</option>
- <?php
- $fetch = mysql_query("SELECT DISTINCT Town FROM properties");
- while ($row = mysql_fetch_array($fetch, MYSQL_ASSOC)) {
- $townnames = $row['Town'];
- echo "<option value=\"$townnames\">$townnames</option>";
- }
- ?>
- </select>
- </form>