javascript - Search form: submit when a name is clicked -


in search box, when user presses 3 letters, list of potential hits shown.

but when user selects name list, still has press enter. how can avoid when selects name, name should automatically submitted.

update: , possible submit when user selects name list, , not when presses enter?

this html code:

    <form action="10_miles.php" method="post">         <p><label>please enter last name , find name in list: </label><br><br>         <input type='text' name='full_name' value='' class='auto'></p>     </form> 

i making use of javascript:

<script type="text/javascript">             $(function() {             $(".auto").autocomplete({                 source: "search_develop.php",                 minlength: 3             });          });     </script> 

you like;

<script type="text/javascript">             $(function() {             $(".auto").autocomplete({                 source: "search_develop.php",                 minlength: 3,                  change: function (event, ui) {                       $('form').submit();                  },                 close: function (event, ui) {                       $('form').submit();                  }             });          });     </script> 

Comments

Popular posts from this blog

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -