Loading ...
Sorry, an error occurred while loading the content.
 

Re: Submit when selected from list AUTOCOMPLETE

Expand Messages
  • djfep
    ... I sent this earlier but it did not seem to go through. Yes. Add a handler to listen to itemSelectEvent: // oAutoComp is the auto complete object
    Message 1 of 2 , Aug 2, 2006
      --- In ydn-javascript@yahoogroups.com, "THECREW" <jim@...> wrote:
      >
      > Is there a way to have the form submit when the selection has been
      > made from the autocomplete list? instead of filling in the form field
      > then having to click on submit?
      >

      I sent this earlier but it did not seem to go through.

      Yes. Add a handler to listen to itemSelectEvent:

      // oAutoComp is the auto complete object
      oAutoComp.itemSelectEvent.subscribe(myOnItemSelect);

      function myOnItemSelect(sType, aArgs) {
      document.getElementById('form_id').submit();
      }
    Your message has been successfully submitted and would be delivered to recipients shortly.