Re: Stuck at the start line with AutoComplete
- 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
> 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
> <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