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

Autocomplete - how to populate it with data from code

Expand Messages
  • restless.being
    Hi! I have an autocomplete field on my page. It is set up and it generally works well. But... My problematic use case starts when a user opens my form (which
    Message 1 of 2 , Mar 31, 2008
    • 0 Attachment
      Hi!

      I have an autocomplete field on my page. It is set up and it
      generally works well. But...

      My problematic use case starts when a user opens my form (which
      includes an autocomplete field) in edit mode. Then the autocomplete
      shows with a value which is set via html "input" tag's "value"
      attribute. This is ok - I'm going to edit some data.

      The problem appears when the autocomplete field receives and then
      looses focus. Then the field's value disappears. This happends
      because autocomplete has "forceSelection = true" and because there
      was no query sent to the server to load data into autocomplete field.

      My question is how can I load some data into my autocomplete field so
      that it won't clear itself? I tried my_autocomplete.sendQuery
      ('params') but it caused autocomplete's suggestion div to show up.
      This is not what I'd like to see after I enter any edit form.

      regards
      eXt
    • restless.being
      Ok, I ve found this: http://tech.groups.yahoo.com/group/ydn- javascript/message/11075 -- eXt
      Message 2 of 2 , Apr 1, 2008
      • 0 Attachment
        Ok, I've found this: http://tech.groups.yahoo.com/group/ydn-
        javascript/message/11075

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