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

Stuck at the start line with AutoComplete

Expand Messages
  • ticklishturtletoe
    Hi all, I m trying to implement AutoComplete in my app. I added all of the necessary JS files as described in the documentation. When I test the one field on
    Message 1 of 3 , May 25, 2006
    • 0 Attachment
      Hi all,

      I'm trying to implement AutoComplete in my app. I added all of the
      necessary JS files as described in the documentation. When I test the
      one field on my page with AutoComplete, nothing happens.

      So I inserted some alerts into autocomplete.js to see where it's
      failing. One alert just before validation of the input element
      executes just fine. But I put another just inside this if statement:

      if(YAHOO.util.Dom.inDocument(inputEl))

      But it doesn't get executed. I've included dom.js, but it seems that
      YAHOO.util.Dom.inDocument() isn't executing. I put an alert just
      inside inDocument() but it doesn't execute.

      What could I be doing wrong?

      TIA,
      TTT
    • ticklishturtletoe
      Well, I discovered my problem. YAHOO.util.Dom.inDocument requires an object, not a string. The reason why I initially missed this detail is because the code
      Message 2 of 3 , May 25, 2006
      • 0 Attachment
        Well, I discovered my problem. YAHOO.util.Dom.inDocument requires an
        object, not a string. The reason why I initially missed this detail
        is because the code inside the if(YAHOO.util.Dom.inDocument(inputEl))
        block can work with a string or an object.

        So why does the AutoComplete constructor documentation say that it can
        take a string or an object reference for the first 2 parameters?

        Now I'm pressing on to figure out why AutoComplete *still* isn't working.

        TTT

        --- In ydn-javascript@yahoogroups.com, "ticklishturtletoe"
        <ticklishturtletoe@...> wrote:
        >
        > Hi all,
        >
        > I'm trying to implement AutoComplete in my app. I added all of the
        > necessary JS files as described in the documentation. When I test the
        > one field on my page with AutoComplete, nothing happens.
        >
        > So I inserted some alerts into autocomplete.js to see where it's
        > failing. One alert just before validation of the input element
        > executes just fine. But I put another just inside this if statement:
        >
        > if(YAHOO.util.Dom.inDocument(inputEl))
        >
        > But it doesn't get executed. I've included dom.js, but it seems that
        > YAHOO.util.Dom.inDocument() isn't executing. I put an alert just
        > inside inDocument() but it doesn't execute.
        >
        > What could I be doing wrong?
        >
        > TIA,
        > TTT
        >
      • jennykhan
        Hi TTT, The AutoComplete constructor does indeed accept either an element ID string or object reference for its first two arguments. In fact, the
        Message 3 of 3 , May 30, 2006
        • 0 Attachment
          Hi TTT,

          The AutoComplete constructor does indeed accept either an element ID
          string or object reference for its first two arguments. In fact, the
          implementation examples are replete with successful usage of ID
          strings in the constructor. If you are having problems with this, the
          best thing to do is provide a URL to a reproducible case for further
          investigation.

          Thanks,
          Jenny



          --- In ydn-javascript@yahoogroups.com, "ticklishturtletoe"
          <ticklishturtletoe@...> wrote:
          >
          > Well, I discovered my problem. YAHOO.util.Dom.inDocument requires an
          > object, not a string. The reason why I initially missed this detail
          > is because the code inside the if(YAHOO.util.Dom.inDocument(inputEl))
          > block can work with a string or an object.
          >
          > So why does the AutoComplete constructor documentation say that it can
          > take a string or an object reference for the first 2 parameters?
          >
          > Now I'm pressing on to figure out why AutoComplete *still* isn't
          working.
          >
          > TTT
          >
          > --- In ydn-javascript@yahoogroups.com, "ticklishturtletoe"
          > <ticklishturtletoe@> wrote:
          > >
          > > Hi all,
          > >
          > > I'm trying to implement AutoComplete in my app. I added all of the
          > > necessary JS files as described in the documentation. When I test the
          > > one field on my page with AutoComplete, nothing happens.
          > >
          > > So I inserted some alerts into autocomplete.js to see where it's
          > > failing. One alert just before validation of the input element
          > > executes just fine. But I put another just inside this if statement:
          > >
          > > if(YAHOO.util.Dom.inDocument(inputEl))
          > >
          > > But it doesn't get executed. I've included dom.js, but it seems that
          > > YAHOO.util.Dom.inDocument() isn't executing. I put an alert just
          > > inside inDocument() but it doesn't execute.
          > >
          > > What could I be doing wrong?
          > >
          > > TIA,
          > > TTT
          > >
          >
        Your message has been successfully submitted and would be delivered to recipients shortly.