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

Autocomplete alwaysShowContainer semantics?

Expand Messages
  • Alan Pinstein
    I am playing with AutoComplete and either found a bug or don t understand the idea behind alwaysShowContainer. You can test this here:
    Message 1 of 2 , Jan 5, 2007
    • 0 Attachment
      I am playing with AutoComplete and either found a bug or don't
      understand the idea behind alwaysShowContainer.

      You can test this here:

      http://developer.yahoo.com/yui/examples/autocomplete/customize.html

      Enable alwaysShowContainer. The container shows instantly, as a
      "empty" box (you can see the border), but no items are shown. The
      behavior changes slightly, in that if you enter "a" and let choices
      pop up, then delete the "a", the container doesn't go away.

      However, I'd expect (at least from reading the docs) that with:

      alwaysShowContainer = true
      minQueryLength = 0

      That you should *immediately* see a list of choices.

      I am hoping to use this style setup as a "combo box" for a list of
      values which will most often be from a pick list, but sometimes a
      custom value will be used. Prior to using autocomplete I have a form
      select box. So I'd like to keep the affordance of "picking from a
      list" to be immediately recognizable.

      Please advise...

      Thanks,
      Alan
    • jennykhan
      Hi Alan, I think you re better off checking out the example here: http://developer.yahoo.com/yui/examples/autocomplete/states_jsfunction.html. Note in
      Message 2 of 2 , Jan 30, 2007
      • 0 Attachment
        Hi Alan,

        I think you're better off checking out the example here:
        http://developer.yahoo.com/yui/examples/autocomplete/states_jsfunction.html.

        Note in particular that an initial query is sent immediately upon
        widget instantiation that returns all possible results. Also, you can
        subscribe to the dataReturn event to give appropriate user feedback
        since the container doesn't collapse as in other examples.

        Hope that helps,
        Jenny






        --- In ydn-javascript@yahoogroups.com, Alan Pinstein <apinstein@...>
        wrote:
        >
        > I am playing with AutoComplete and either found a bug or don't
        > understand the idea behind alwaysShowContainer.
        >
        > You can test this here:
        >
        > http://developer.yahoo.com/yui/examples/autocomplete/customize.html
        >
        > Enable alwaysShowContainer. The container shows instantly, as a
        > "empty" box (you can see the border), but no items are shown. The
        > behavior changes slightly, in that if you enter "a" and let choices
        > pop up, then delete the "a", the container doesn't go away.
        >
        > However, I'd expect (at least from reading the docs) that with:
        >
        > alwaysShowContainer = true
        > minQueryLength = 0
        >
        > That you should *immediately* see a list of choices.
        >
        > I am hoping to use this style setup as a "combo box" for a list of
        > values which will most often be from a pick list, but sometimes a
        > custom value will be used. Prior to using autocomplete I have a form
        > select box. So I'd like to keep the affordance of "picking from a
        > list" to be immediately recognizable.
        >
        > Please advise...
        >
        > Thanks,
        > Alan
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.