This content has been marked as final.
Show 2 replies
-
1. Re: Autosuggest and dataset notifications / callbacks
Phil_W Oct 30, 2009 5:51 AM (in response to Phil_W)Hi,
I've determined a solution to this.
I added an event listener to the autosuggest element. It detects the click and calls the setrow function of SpryData on my dataset.
cheers
Phil
-
2. Re: Autosuggest and dataset notifications / callbacks
Arnout Kazemier Oct 30, 2009 1:02 PM (in response to Phil_W)Seems like I completely missed your question here. I once required the same kind of functionality inside my autosuggest. I extended the autosuggest to do a fire my callback function. This is a more secure solution that adding a click handler.
Extend the following method:
Spry.Widget.AutoSuggest.prototype.setValue = function(str) { if (!this.textElement) return; this.textElement.value = str; this.showSuggestions(false); if(this.callback){ this.callback( str ); } };Than in your constructor you can add the option :callback: function( value ){ do stuff };If i miss these questions in the future don't hesitate to PM me


