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

Autocomplete: How to use when value="string1, string2"

Expand Messages
  • thespursfan29
    I have gotten the autocomplete to work great when I am trying to add a new entry. For example, if I am inserting a new movie into a database, I can use an
    Message 1 of 2 , Dec 3, 2006
    View Source
    • 0 Attachment
      I have gotten the autocomplete to work great when I am trying to add a
      new entry. For example, if I am inserting a new movie into a database,
      I can use an autocomplete input field and tag the movie with tags I
      already entered.

      But, say I want to edit a movie, and I use php to pre-populate the
      value of the autocomplete field and it produces
      <input name="tags" id="tags" value="comedy, billy madison" />

      When I try to add another tag after billy madison, the list of tags
      won't show up like they should. Is there anyway to add this functionality?
      It seems it will work when value="", but when value="something, tag
      here, etc." it doesn't want to work.
      Maybe it's a simple fix that I'm just not catching yet.

      Any help would be appreciated. I noticed that yahoo my web beta, works
      exactly like I want, but when looking the their source, it looks like
      they are using proprietary javascript code/files (that don't seem to
      be apart of yui) so I didn't want to steal their code.
    • thespursfan29
      Weird, I think when I tried putting it into my form, something got messed up. I just did a test, and it worked fine. Seems this functionality is already built
      Message 2 of 2 , Dec 3, 2006
      View Source
      • 0 Attachment
        Weird, I think when I tried putting it into my form, something got
        messed up. I just did a test, and it worked fine.

        Seems this functionality is already built in and taken care of by
        default, but I messed it up somehow.

        Sorry! I'll figure it out soon enough :)
      Your message has been successfully submitted and would be delivered to recipients shortly.