Autocompleter is great, but a few more options would really make it useful!

瀏覽次數:5 次
跳到第一則未讀訊息

zeekay

未讀,
2010年4月5日 清晨6:14:392010/4/5
收件者:scripty2
Been messing around with the Autocompleter, REALLY nice. Works
fantastic.! I've modified it so that it calls a function on select (I
want to jump directly to a url on select). It'd be nice if you could
possibly extend it so that you could set a function to call on select,
and possibly add some option to return the index of the selected
choice, or add the option to pass json objects with associated info/
urls for the choices. Using it this way I also modified the tab key
event so it works the same as the key down event and cycles through
the suggestions...I really like the way that works too. Maybe another
option? Just a few suggestions, thanks a lot for scripty2 I've been
using the heck out of it!

Andrew Dupont

未讀,
2010年4月25日 凌晨1:42:262010/4/25
收件者:scripty2
I thought I'd added a custom event that would fire when the user
selects an autocompleter option. I was wrong. I'll put that in.

Cheers,
Andrew
--
You received this message because you are subscribed to the Google Groups "scripty2" group.
To post to this group, send email to scri...@googlegroups.com.
To unsubscribe from this group, send email to scripty2+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/scripty2?hl=en.

Ciaran Archer

未讀,
2010年5月7日 凌晨3:52:012010/5/7
收件者:scripty2
HI - loving the potential of Scripty2 as well, and I'm looking to at
the Autocompleter. Very impressed so far!

As @seekay said: "It'd be nice if you could
possibly extend it so that you could set a function to call on
select,
and possibly add some option to return the index of the selected
choice, or add the option to pass json objects with associated info/
urls for the choices."

This would be great if implemented. Imagine you are searching a list
of users in your system, and you need to obviously select the correct
userName but ALSO need to store the userID of the user for (perhaps)
later form submission. One suggestion is actually having the option to
pass an array of objects, but the object will need to have a 'text'
property, or alternatively you could pass the name of the property
you'd like to do the match on.

Then on select the selected object is passed to a function of your
choice. That way you can grapb other properties from it (such as and
ID) and store it etc.

One other little thing: maybe I haven't the bleeding edge build yet,
but if I start typing and then delete everything I type, the
selections in the list still appear. I feel it should not display any
results once everything is deleted.

Let me know your thoughts if possible!

Cheers
Ciaran
回覆所有人
回覆作者
轉寄
0 則新訊息