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

Re: YUI Autocomplete problem (YAHOO.widget.DS_JSFunction vs. YAHOO.widget.DS_JSA

Expand Messages
  • Mike Gallagher
    I am having the exact same problem and, unfortunately, giving the function sQuery as a parameter doesn t help :( Thanks in advance for your help, Mike ...
    Message 1 of 3 , Mar 4 3:37 PM
    • 0 Attachment
      I am having the exact same problem and, unfortunately, giving the
      function sQuery as a parameter doesn't help :(

      Thanks in advance for your help,
      Mike


      --- In ydn-javascript@yahoogroups.com, "parallel_galaxy" <katya@...>
      wrote:
      >
      > just looking at this example
      >
      http://developer.yahoo.com/yui/examples/autocomplete/ac_states_jsfunction.html
      > makes me think that you didn't declare returnMyArray1 correctly. have
      > you tried giving it sQuery as a parameter?
      >
      > --- In ydn-javascript@yahoogroups.com, "Ryan Alexander"
      > <rnalexander@> wrote:
      > >
      > > I've been banging my head against the wall over this one and I can't
      > > figure out what I'm doing wrong. I've reduced the problem to the
      > > simplest form:
      > >
      > > ------
      > >
      > > var myArray1 = ["aa", "ab", "ac", "bb", "ba", "bc", "ca", "cb", "cc"];
      > >
      > > var returnMyArray1 = function() {
      > > return myArray1;
      > > }
      > >
      > >
      > > var myDataSource1 = new YAHOO.widget.DS_JSArray(myArray1);
      > > var myDataSource2 = new YAHOO.widget.DS_JSFunction(returnMyArray1);
      > >
      > > function registerTickerSearchWorks() {
      > > var tickerFinder = new YAHOO.widget.AutoComplete("tickerAuto",
      > > "tickerSearchContainer", myDataSource1);
      > > }
      > >
      > > function registerTickerSearchDoesNotWorkWhy() {
      > > var tickerFinder = new YAHOO.widget.AutoComplete("tickerAuto",
      > > "tickerSearchContainer", myDataSource2);
      > > }
      > >
      > > -----
      > >
      > > The first function works, the second function causes errors. I
      > > understand that by putting in a function that it'll bypass the
      > > matching. But it doesn't even return the full array, it errors out on
      > > IE and I get a list of:
      > >
      > > a
      > > a
      > > a
      > > b
      > > b
      > > b
      > > c
      > > c
      > > c
      > >
      > > on Firefox.
      > >
      > > Could someone please clue me?
      > >
      > > Thanks!
      > >
      > > -Ryan
      > >
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.