magicsuggest

MagicSuggest dynamic ajax source

眉间皱痕 提交于 2019-12-22 09:57:10
问题 I'm using MagicSuggest for auto completing an input text, the autocomplete feed its very big so i cant download it complete, in their example they provide this code: JAVASCRIPT $(document).ready(function() { var jsonData = []; var cities = 'New York,Los Angeles,Chicago,Houston,Paris,Marseille,Toulouse,Lyon,Bordeaux,Philadelphia,Phoenix,San Antonio,San Diego,Dallas,San Jose,Jacksonville'.split(','); for(var i=0;i<cities.length;i++) jsonData.push({id:i,name:cities[i],status:i%2?'Already Visited

Transliteration and fuzzy search, like Google suggestions

拜拜、爱过 提交于 2019-12-11 18:58:05
问题 I need to do a fuzzy search with transliteration of the characters, for example: I have an ASP.NET application, database, which has a table with a list of Spanish words (200,000 entries), I also have a page with an input field. The point is that I do not know Spanish, and I do not know how to spell a search word in Spanish, but I know how it sounds. Therefore, in the text box I enter the search word, such as "beautiful", but in the recording err - "prekieso", and I need to get from the

Magic Suggest - Pre-select multiple items from MVC Model

巧了我就是萌 提交于 2019-12-10 17:22:21
问题 I'm looking for a way to populate the Magic Suggest control with multiple values. I am using ASP.NET MVC and would like to set these values based on properties in the model. Part 1: Magic Suggest Support for Multiple Values? A related question on SOF addresses adding a single value but not multiple. Is this possible? Part 2 : Ideally, I'd like to bind the control the MVC model somehow. If this is not possible, I'd at least like to set the pre-selected values dynamically. I have access the

MagicSuggest - set magic suggest list with pre selected items

我与影子孤独终老i 提交于 2019-12-10 17:17:47
问题 I am using MagicSuggest to populate tag list from following JSON data: {"Id":"money","name":"money"},{"Id":"education","name":"education"}] while I am going to edit page, need to pre-populate the selected tags:- like one pre-populated tag: money Please suggest how I can set magic suggest list with pre selected items Below code is the one which I have tried so far : var article_tags = $('#article_tags').magicSuggest({ data: 'http://localhost:1043/Tag/TagData', sortOrder: 'name', valueField:

Sending vars to server using MagicSuggest

限于喜欢 提交于 2019-12-06 08:31:35
Im using this great jquery plugin to handle autocomplete on textboxes, i got everything working using this script: var ms1; $(document).ready(function() { ms1 = $('#ms1').magicSuggest({ data: 'http://punctis.com/app_dev.php/ajax/autocompletefeed/1/city', sortOrder: 'name', minChars: 2, maxResults: false, allowFreeEntries: false, selectionPosition: 'right', groupBy: 'utenti', maxDropHeight: 200 }); }); And this Html: <form name="email_form"> <input id="test_normalValue" name="test_normalValue" type="text" class="input-large"> <input id="ms1" name="ms1" type="text" class="input-large"> </form>

Set default selection to Magic suggest

…衆ロ難τιáo~ 提交于 2019-11-29 15:30:36
I have a Magic suggest box in my application. For that I want to set default selected values. I have JSON object as well to bind the data. But I didn't find any option like how to make them selected. Is there any option in Magic suggest? Please let me know. Any help would be appreciated. Use the 'value' option: $('#ms-gmail').magicSuggest({ resultAsString: true, width: 590, value: ['john@kennedy.com'], data: 'marilyn@monroe.com, mother@teresa.com,...,jimmy@wales.com' }); The above example sets the default selected value to 'john@kennedy.com' See http://nicolasbize.github.io/magicsuggest/ 来源:

Set default selection to Magic suggest

懵懂的女人 提交于 2019-11-28 09:00:45
问题 I have a Magic suggest box in my application. For that I want to set default selected values. I have JSON object as well to bind the data. But I didn't find any option like how to make them selected. Is there any option in Magic suggest? Please let me know. Any help would be appreciated. 回答1: Use the 'value' option: $('#ms-gmail').magicSuggest({ resultAsString: true, width: 590, value: ['john@kennedy.com'], data: 'marilyn@monroe.com, mother@teresa.com,...,jimmy@wales.com' }); The above