jquery-tokeninput

Populate JQuery TokenInput on AJAX event

早过忘川 提交于 2020-01-07 09:43:51
问题 Let say a jQuery TokenInput is attached with a text field with a pre populate parameter defined during its initialization. Now I want to populate that input field with some tokens on an event trigger without re-initialization of this plugin. 回答1: I have found the solution of my work. Thats why I am posting here so that others can benefit from this answer. Let say Occupation is my field with id "occupation". $("#occupation").tokenInput("add", {id: 1, name: "Software Engineer"}); "add" is a

token input not working

十年热恋 提交于 2020-01-06 07:51:40
问题 I am getting values on variable "url" but my textbox not geting that values when variable assigned to Tokeninput..instead when i pass values directly to tokeninput my textbox is working..Finally i need to read my text box when i pass variable as tokeninput.. Thanks in advance <script type="text/javascript"> $(document).ready(function () { var url; $.ajax({ type: "POST", url: "Tokeninput.aspx/GetData", contentType: "application/json; charset=utf-8", data: JSON.stringify({ Locale: 'en-US' }),

How to modify jquery-token-input css to add a tiny rectangle around the X to cancel?

帅比萌擦擦* 提交于 2019-12-25 08:14:38
问题 I am using the jQuery tokenInput plugin. My current tokens look like this: If you look at the token fields, the latest tag called mstagtesting has an X at the end, which appears on mouse hover. I want to change the area around the X and introduce a rectangle around the X to make it look like these if hovered on : How do I modify the css to add the rectangle of white background color around the X that serves to de-select a token when clicked on ? Thanks so much for your help and here is my css

How to test jQuery TokenInput field using Selenium

纵然是瞬间 提交于 2019-12-24 15:22:11
问题 I'm unable to test a Tokeninput field in a form using selenium. The situation is when we type something, it gives a list to options to select but those options aren't part of the DOM. The text fills the field but doesn't select the item. The code which I have written is: Given admin user is on schedule interview page And he select "obie[1]" and "DHH[1]" from the candidate name(s) auto sugget field **step defination** Given /^he select "([^"]*)" and "([^"]*)" from the candidate name\(s\) auto

Changing Token Limit Dynamically on add function of jquery token input

耗尽温柔 提交于 2019-12-24 11:48:20
问题 I need to change the token limit of a token input textbox dynamically based on its add and on delete functions. In my case when the user selects an item called "all users" from the list, the token limit should change to 1 and when the same is removed it should be again null. 来源: https://stackoverflow.com/questions/28474159/changing-token-limit-dynamically-on-add-function-of-jquery-token-input

Any idea not to select the name that is already chosen in token input?

…衆ロ難τιáo~ 提交于 2019-12-24 10:11:28
问题 Is there any idea not to select the name that is already chosen in token input? For example In first I select mango when I search for m. Next time again when I search for m Mango should not be displayed as mango is already chosen. Is there any idea? <%= f.text_field :plan_tokens, data: {load: @customer.plans} %> I have my js like this jQuery -> $('#customer_plan_tokens').tokenInput '/plans.json' theme: 'facebook' prePopulate: $('#customer_plan_tokens').data('load') where to put

Why does jquery ui dialog mangle my jquery.tokeninput.js autocomplete?

淺唱寂寞╮ 提交于 2019-12-23 04:52:33
问题 I am using the snazzy jquery tokeninput plugin and jquery ui. When I display a form with a token input in it, rather than displaying the token input correctly, it loses some styling and splits into two input boxes. I've made a repro page (linked below) which mangles it. Why is it doing it, and what can i do to fix it? example repo html doc here: http://dl.dropbox.com/u/2808109/jquery%20dialog%20tokeninput%20demo.htm edit: have found the answer 回答1: It looks like dialog re-runs the script tags

Make Prototype and tokeninput.js files work together

吃可爱长大的小学妹 提交于 2019-12-21 23:41:13
问题 Im using following JS file on my page https://github.com/loopj/jquery-tokeninput/blob/master/src/jquery.tokeninput.js but Im also having Prototype.js file attached on same page and first script is not working because of Prototype. Can anyone tell me what changes I need to make using var $j = jQuery.noConflict(); so tokeninput.js can work. Hope someone understand what Im trying to ask. Regards. 回答1: Hi I was in the same situation but i have found a solution i would like to share with you This

Uncaught TypeError: Cannot use 'in' operator to search for '' in JSON string

…衆ロ難τιáo~ 提交于 2019-12-20 11:48:53
问题 I've use token input in my website, and here's how I initialize the token input: $(document).ready(function () { var populateValue = document.getElementById('<%= hiddentokenPrePopulate.ClientID%>').value $("#<%= tokenEmployee.ClientID%>").tokenInput("../Employee/getEmployeeDetails.ashx", { deleteText: "X", theme: "facebook", preventDuplicates: true, tokenDelimiter: ";", minChars: 3, tokenLimit: 1, prePopulate: populateValue }); }); The script was stuck on this line: prePopulate: populateValue

jQuery Tokeninput with “Combobox” functionality?

天涯浪子 提交于 2019-12-19 11:05:39
问题 I'm using Loopj Tokeninput plugin and I would like to know if anyone has implemented the jQuery "combobox" functionality in it? or something similar? The scope is to allow for displaying all the data from a local source by clicking an "arrow down" or just by clicking in the input field just like a dropdown menu (but allowing to narrow it down when typing something...). If so, could anyone share how to implement it? 回答1: Hey there is no method predefined to do that in tokeninput plugin..