Skip navigation
Currently Being Moderated

Spry Autosuggest: Show All

Mar 18, 2010 7:39 AM

Does anyone know of a way to make the Spry AutoSuggest Widget show all options when you first click on it?

 

var SpryAutoSuggest3 = new Spry.Widget.AutoSuggest('statusform', 'suggestedStatus', 'dsStatus', 'statusType', {loadFromServer: true, urlParam: 'status'});

 

This grabs the data from the XML file as you type it. The XML is database generated on the fly. The XML either shows all the options, or just the ones beginning with the string passed to it from the form field.

 

I just want to show all the options when the field is first clicked, and allow them to type if they want to filter it down. My only other option is a normal select list, but thats not as fun

 

Cheers,


Steve

 
Replies
  • Currently Being Moderated
    Mar 23, 2010 4:06 AM   in reply to Dooza (Steve)

    Hi,

     

    Sorry for the late response. You can use the autosuggest methods to force displaying the results div. You could add a onclick listener that"

     

    1. Removes the filter set by the Autosuggest widget
    2. calls  SpryAutoSuggest3.showSuggestions( true );

     

    That would probably help, i hope

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 18, 2010 9:35 AM   in reply to Arnout Kazemier

    I have the same problem.

     

    How should I removes the filter set by the Autosuggest widget?

     

    Thanks!

     
    |
    Mark as:
  • Currently Being Moderated
    May 16, 2011 6:27 AM   in reply to Dooza (Steve)

    You can manually try to trigger the `onPostLoad` event: dsFaultCodes.notifyObservers('onPostLoad')

     

    As usual I answer my own question just moments after posting it!

     

    function showList(event){

        dsFaultCodes.removeAllFilters(true);

        dsFaultCodes.loadData();

        SpryAutoSuggest.showSuggestions(true);

    }

     

    This does work, but only once, if you clear the field and try to start again it wont list them all, just the last one you selected. For some reason the removeAllFilters isn't working.

     

    Any ideas?

     

    Cheers,

     

    Steve

    >

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points