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

Re: Autocomplete: getListItemData

Expand Messages
  • jennykhan
    Hi Jesse, That should work fine, except for a small typo in your code: // New way? var selItem = oAutoComp.getListItemData(oItem); name = selItem[0]; // not
    Message 1 of 2 , Jul 27, 2006
      Hi Jesse,

      That should work fine, except for a small typo in your code:

      // New way?
      var selItem = oAutoComp.getListItemData(oItem);
      name = selItem[0]; // not selectedItem[0]
      value = selItem[1]; // not selectedItem[1]

      j




      --- In ydn-javascript@yahoogroups.com, "jessekeller" <jessekeller@...>
      wrote:
      >
      > In my OnItemSelect handler, it looks like the way to access the query
      > data has changed in 0.11. Can anyone confirm for me that this is right?
      >
      >
      > function myOnItemSelect(sType, aArgs) {
      >
      > // My schema:
      > // ["results", "name", "value"]
      >
      > var oItem = aArgs[1];
      >
      > // Old way
      > name = oItem._oResultData.name;
      > value = oItem._oResultData.value
      >
      > // New way?
      > var selItem = oAutoComp.getListItemData(oItem);
      > name = selectedItem[0];
      > value = selectedItem[1];
      >
      > }
      >
      >
      > Thanks!
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.