开发者

Create an autocomplete or dropdown based on json object

I'm passing a Json object from PHP with the funcion json_encode(). The result of this enconding is something like

var arrSelectCiudadesJson = [{"C_CIUDAD":"Abra Pampa"},{"C_CIUDAD":"Acassuso"},{"C_CIUDAD":"A开发者_StackOverflowcceso Bancalari - Gral. Pacheco"},{"C_CIUDAD":"Acebal"},{"C_CIUDAD":"Achiras"},{"C_CIUDAD":"Achumani - La Paz"},...];

I would like to use this object and some others to create dropdonw menus and in specific cases autocomplete input boxes. I tried some examples but I think I'm not looking in the right direction.

Could you give me some places were I can look for tutorial or more information?

Thanks in advance! V


My personal favourite is: http://loopj.com/jquery-tokeninput/ for Autocomplete, Comes with lots of options and well documented.

For Dropdown menu's - I would suggest something in jQuery UI.


Check out this jQuery plugin demo.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜