How can I implement a gmail-style label chooser?

泪湿孤枕 提交于 2019-12-04 14:12:54

Horace - you want something really complicated, and you should take into account that even with a lot of pre-made component, it will take some time to get something like this working (not to mention - being pretty :-) ).

Anyway, pre-made components are nice but I often like to hack it myself, free-style like. So here is something I cooked up to get you going: My simple label demo (warning - I only tested this on Firefox 3 and I'm pretty sure that it won't work in anything else).

It is far from being pretty, but the code is pretty straight forward and should be easy to understand.

I was looking for a similar label implementation, and stumbled on this thread.

I can't add to the JS part of the question, but in terms of the "prettiness" of the labels, you might find the following article/code useful:

CSS Gmail-Like Labels

All the best!

Alex Barrett

I doubt there is a precooked solution out there that does exactly what you want, but you should be able to put something together yourself with a decent JavaScript library. Something like Ext JS would be ideal for this.

A few API pages of potential interest:

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!