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

Re: [ydn-javascript] Re: Autocomplete

Expand Messages
  • Suryakant Naik
    Thanks Lou. ... From: lou_tribal Subject: [ydn-javascript] Re: Autocomplete To: ydn-javascript@yahoogroups.com Date: Wednesday, May 27,
    Message 1 of 12 , May 26 8:34 PM
    • 0 Attachment
      Thanks Lou.

      --- On Wed, 5/27/09, lou_tribal <lou_tribal@...> wrote:

      From: lou_tribal <lou_tribal@...>
      Subject: [ydn-javascript] Re: Autocomplete
      To: ydn-javascript@yahoogroups.com
      Date: Wednesday, May 27, 2009, 1:24 AM

      Here is the way I did it.

      var mydataSource = ...

      mydatasource. doQuery = function(oCallbackF n, sQuery, oParent) {
      // Override this method to be able to perform query qhen typing
      // something in the field AND to return all result when the field
      // focused and empty.
      }

      var myautocomplete = new YAHOO.widget. AutoComplete( myField, myContainer, mydatasource) ;
      myautocomplete. textboxFocusEven t.subscribe( _onFocus, this, true);

      _onFocus = function(){
      var value = this._field. value;
      if(value.length === 0) myautocomplete. sendQuery( value);
      }

      &lt;

      --- In ydn-javascript@ yahoogroups. com, "surynaik@.. ." <surynaik@.. .> wrote:
      >
      > Is there a way to show the autocomplete list when the control gets the focus instead of the user having to type the first character?
      >
      > Thanks
      >


    Your message has been successfully submitted and would be delivered to recipients shortly.