jQuery UI Widgets › Forums › Editors › Input, Password Input, TextArea, ColorPicker, Rating, TagCloud, Loader › Multiple Values | Get response from server-side base on input value
Tagged: Angular input, angular2 input, bootstrap input, javascript input, jQuery Input, jqwidgets input, jqxinput
This topic contains 1 reply, has 2 voices, and was last updated by Hristo 8 years, 1 month ago.
-
Author
-
October 5, 2016 at 7:19 am Multiple Values | Get response from server-side base on input value #87922
Hi,
Is it possible to achieve Multiple values input similar to Auto Complete?
Meaning: send a query to server and get a response based on the keyed-in values each time.
For example:
$("#input").jqxInput({ placeHolder: "Enter a City", height: 25, width: 200, source: function (query, response) { var dataAdapter = new $.jqx.dataAdapter ( { datatype: "jsonp", datafields: [ { name: 'countryName' }, { name: 'name' }, { name: 'population', type: 'float' }, { name: 'continentCode' }, { name: 'adminName1' } ], url: "http://api.geonames.org/searchJSON", data: { featureClass: "P", style: "full", maxRows: 12, username: "jqwidgets" } }, { autoBind: true, formatData: function (data) { data.name_startsWith = query; return data; }, loadComplete: function (data) { if (data.geonames.length > 0) { response($.map(data.geonames, function (item) { return { label: item.name + (item.adminName1 ? ", " + item.adminName1 : "") + ", " + item.countryName, value: item.name } })); } } } ); } });
Looking forward.
Thanks & Regards,
SenthilOctober 14, 2016 at 12:24 pm Multiple Values | Get response from server-side base on input value #88206Hello raj,
Please, take a look at this example:
http://jsfiddle.net/jqwidgets/BcYMU/Best Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.com -
AuthorPosts
You must be logged in to reply to this topic.