<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"><channel><title>LoopJ - Latest Comments</title><link xmlns="http://www.w3.org/2005/Atom" rel="http://api.friendfeed.com/2008/03#sup" href="http://disqus.com/sup/all.sup#forumcomments-445dc1bd" type="application/json"/><link>http://loopj.disqus.com/</link><description></description><language>en</language><lastBuildDate>Fri, 03 Jul 2009 15:19:18 -0000</lastBuildDate><item><title>Re: jQuery Plugin: Tokenizing Autocomplete Text Entry</title><link>http://loopj.com/2009/04/25/jquery-plugin-tokenizing-autocomplete-text-entry/#comment-12087181</link><description>Great dude ... my congrats</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">choco</dc:creator><pubDate>Fri, 03 Jul 2009 15:19:18 -0000</pubDate></item><item><title>Re: jQuery Plugin: Tokenizing Autocomplete Text Entry</title><link>http://loopj.com/2009/04/25/jquery-plugin-tokenizing-autocomplete-text-entry/#comment-11995986</link><description>Yes, can somebody help. How do we allow user to add an inputed token that is not in the list ?</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">gp</dc:creator><pubDate>Wed, 01 Jul 2009 17:16:50 -0000</pubDate></item><item><title>Re: jQuery Plugin: Tokenizing Autocomplete Text Entry</title><link>http://loopj.com/2009/04/25/jquery-plugin-tokenizing-autocomplete-text-entry/#comment-11990812</link><description>Here's my addition to the script: Replace lines 509-593&lt;br&gt;                 if(settings.method == "POST")&lt;br&gt;                   {&lt;br&gt;                      $.post(settings.url, {"q": query}, function (results) {&lt;br&gt;                         cache.add(query, results);&lt;br&gt;                         populate_dropdown(query, results);&lt;br&gt;                       }, "json");&lt;br&gt;                   }&lt;br&gt;                  else&lt;br&gt;                    {&lt;br&gt;                       $.get(settings.url, {"q": query }, function (results) {&lt;br&gt;                         cache.add(query, results);&lt;br&gt;                         populate_dropdown(query, results);&lt;br&gt;                       }, "json");&lt;br&gt;                    }</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">ellisgl</dc:creator><pubDate>Wed, 01 Jul 2009 14:44:20 -0000</pubDate></item><item><title>Re: jQuery Plugin: Tokenizing Autocomplete Text Entry</title><link>http://loopj.com/2009/04/25/jquery-plugin-tokenizing-autocomplete-text-entry/#comment-11990274</link><description>I've been noticing every once in a while the ajax callback is returning a 302 and doesn't update the entry. A fix would be to use POST instead of GET.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">ellisgl</dc:creator><pubDate>Wed, 01 Jul 2009 14:28:09 -0000</pubDate></item><item><title>Re: jQuery Plugin: Tokenizing Autocomplete Text Entry</title><link>http://loopj.com/2009/04/25/jquery-plugin-tokenizing-autocomplete-text-entry/#comment-11859094</link><description>Great work James and co contributors. Very easy to implement.&lt;br&gt;&lt;br&gt;Note: I’m working from one of the hybrid versions –source control vote++. &lt;br&gt;&lt;br&gt;My requirement: Allow the user to select country, then state based on country, then suburb / town based on state. This scenario seems like a natural fit for this style of control but yet to find an example of this implementation. I'll post when functional.&lt;br&gt;&lt;br&gt;I have this working fine for new address where there are no predefined values. I use the call back to initialise the dependant controls. I can’t load all 3 controls using the ready event as there are dependent parameters for state and suburb (when new address) so I have a method buildState, buildSuburb as the call back for country and state respectively. All works fine until edit. When an address exists I pre populate with the required values however I can’t prevent the drop down from showing nor can I find a way to call the hide_dropdown method.  Alternatively (preferred method) would be to assign the call back methods after the controls are initialised but can’t see a way to do this either.&lt;br&gt;&lt;br&gt;I’m finding my way around JQuery so please feel free to suggest / critique my approach / implementation. &lt;br&gt;&lt;br&gt; JS</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">JS</dc:creator><pubDate>Sun, 28 Jun 2009 14:45:28 -0000</pubDate></item><item><title>Re: jQuery Plugin: Tokenizing Autocomplete Text Entry</title><link>http://loopj.com/2009/04/25/jquery-plugin-tokenizing-autocomplete-text-entry/#comment-11830688</link><description>I need to provide autocomplete results and recieve whatever new tag/name/text the user wants to create or send back to the server.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Marcos</dc:creator><pubDate>Sat, 27 Jun 2009 10:29:59 -0000</pubDate></item><item><title>Re: jQuery Plugin: Tokenizing Autocomplete Text Entry</title><link>http://loopj.com/2009/04/25/jquery-plugin-tokenizing-autocomplete-text-entry/#comment-11781078</link><description>I'm not sure what you mean by new tags.   You mean the autocomplete results?  Your url (first argument to tokenInput) needs to be a URL that is going to return those results in json format.  At the top of this blog, there is a usage section that shows the exact json format.  My server side is django, but yours might be php, cgi, or whatever is your server program.  &lt;br&gt;&lt;br&gt;Margie</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Margie Roginski</dc:creator><pubDate>Fri, 26 Jun 2009 13:12:26 -0000</pubDate></item><item><title>Re: jQuery Plugin: Tokenizing Autocomplete Text Entry</title><link>http://loopj.com/2009/04/25/jquery-plugin-tokenizing-autocomplete-text-entry/#comment-11780057</link><description>I haven't found a way to recieve new tags. Right now I have a collection of pre populated results but what I want to achieve is the user to add new tags if they do not exist..  How can I do this?&lt;br&gt;&lt;br&gt;Thanks,</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Marcos</dc:creator><pubDate>Fri, 26 Jun 2009 12:53:16 -0000</pubDate></item><item><title>Re: jQuery Plugin: Tokenizing Autocomplete Text Entry</title><link>http://loopj.com/2009/04/25/jquery-plugin-tokenizing-autocomplete-text-entry/#comment-11776171</link><description>You need to use the prePopulate option.  It's in the version that Richard G refers to above, and there is an example above as well.  I used that and it worked well.&lt;br&gt;&lt;br&gt;Margie</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Margie Roginski</dc:creator><pubDate>Fri, 26 Jun 2009 11:16:34 -0000</pubDate></item><item><title>Re: jQuery Plugin: Tokenizing Autocomplete Text Entry</title><link>http://loopj.com/2009/04/25/jquery-plugin-tokenizing-autocomplete-text-entry/#comment-11770107</link><description>The Stuff is really cool .. but I am not able to show the dafault values in the field. Can you plaease tell me how to do this.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">sudip</dc:creator><pubDate>Fri, 26 Jun 2009 07:30:04 -0000</pubDate></item><item><title>Re: Python API for TheTVDB.com</title><link>http://loopj.com/2009/05/06/python-api-for-thetvdbcom/#comment-11727141</link><description>I'll certainly have a look and thanks for creating this James. If it works out I'd like to use it in a project I'm starting : &lt;a href="http://code.google.com/p/medianav/" rel="nofollow"&gt;http://code.google.com/p/medianav/&lt;/a&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Andre Miller</dc:creator><pubDate>Thu, 25 Jun 2009 11:34:36 -0000</pubDate></item><item><title>Re: jQuery Plugin: Tokenizing Autocomplete Text Entry</title><link>http://loopj.com/2009/04/25/jquery-plugin-tokenizing-autocomplete-text-entry/#comment-11725094</link><description>hi there,&lt;br&gt;&lt;br&gt;thanks for the nice plugin, I'm using with some modification. My suggestion is rather than license it under GPL2, more permissive such as LGPL/MIT/BSD is better.&lt;br&gt;&lt;br&gt;Anyway tqvm for the nice plugin.&lt;br&gt;&lt;br&gt;Regards.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Abu Ammar</dc:creator><pubDate>Thu, 25 Jun 2009 10:37:36 -0000</pubDate></item><item><title>Re: jQuery Plugin: Tokenizing Autocomplete Text Entry</title><link>http://loopj.com/2009/04/25/jquery-plugin-tokenizing-autocomplete-text-entry/#comment-11715608</link><description>If we’d change to a plan similar to the one used in the Netherlands, where 100% of the population is covered at a cost of less than 10 % of GNP, we’d save roughly $1 trillion each year and have a much happier, productive population. Why do conservatives (Republicans) want to make the insurance companies, drug companies, doctors and hospitals rich, are they so heavily invested into these industries? What si so wrong with &lt;a href="http://www.geonlineservicesite.com" rel="nofollow"&gt;www.geonlineservice.com&lt;/a&gt; the Federal Government determinning what should be in the insurance package for everyone? The FDA does a credible job on drugs. Objecting to paying through taxation for benefits that one does not select personally is crazy</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">pamelae13rideout</dc:creator><pubDate>Thu, 25 Jun 2009 03:02:18 -0000</pubDate></item><item><title>Re: jQuery Plugin: Tokenizing Autocomplete Text Entry</title><link>http://loopj.com/2009/04/25/jquery-plugin-tokenizing-autocomplete-text-entry/#comment-11603631</link><description>I think your question was the same as mine - you are trying to get the numeric id associated with your strings?  They come back in the actual input field that you call tokenInput on.  For example, I called it like this:&lt;br&gt;&lt;br&gt;    $('#id_owners'').tokenInput(&lt;br&gt;        '/taskmanager/get_matching_users_multi/', {&lt;br&gt;        hintText:"Type username here",&lt;br&gt;	noResultsText:"No results",&lt;br&gt;	searchingText: "Searching...",&lt;br&gt;            classes: {&lt;br&gt;                tokenList: "token-input-list-facebook",&lt;br&gt;                token: "token-input-token-facebook",&lt;br&gt;                tokenDelete: "token-input-delete-token-facebook",&lt;br&gt;                selectedToken: "token-input-selected-token-facebook",&lt;br&gt;                highlightedToken: "token-input-highlighted-token-facebook",&lt;br&gt;                dropdown: "token-input-dropdown-facebook",&lt;br&gt;                dropdownItem: "token-input-dropdown-item-facebook",&lt;br&gt;                dropdownItem2: "token-input-dropdown-item2-facebook",&lt;br&gt;                selectedDropdownItem: "token-input-selected-dropdown-item-facebook",&lt;br&gt;                inputToken: "token-input-input-token-facebook"&lt;br&gt;            }&lt;br&gt;        });&lt;br&gt;&lt;br&gt;In my POST, id_owners contained a string like this: "3,4,4" coresponding to usernames  "john",  "andy", "andy" that were submitted.  Note that if the same string is chosen by the user multiple times, its value comes back multiple times as well.&lt;br&gt;&lt;br&gt;I looked at some other packages, in particular &lt;a href="http://www.emposha.com/javascript/jquerymultiselect.html" rel="nofollow"&gt;http://www.emposha.com/javascript/jquerymultise...&lt;/a&gt;, but could not figure out how to get the values.  Maybe I was just being stupid... but when I posted on the blog there, got no response.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Margie Roginski</dc:creator><pubDate>Tue, 23 Jun 2009 02:24:52 -0000</pubDate></item><item><title>Re: jQuery Plugin: Tokenizing Autocomplete Text Entry</title><link>http://loopj.com/2009/04/25/jquery-plugin-tokenizing-autocomplete-text-entry/#comment-11603491</link><description>Thanks for your response Rich.  I'm a bit of a newbie in this javascript/jquery area, but with an evening's work I got it working and integrated into my django app.  Despite the fact that it is not source code revisioned, I found this package to be the most well documented and usable of any I've found.  One minor thing I noticed is that when I type 'tab' to select the value, it selected the value but then the cursor went on to the next input field in my form.  It seems like it should stay in the tokeninput field so that the user can then choose another value.  I found that if I change the 'return true' at line 164 to 'return false', that it then does what I want, selects the value and stays in the input so that I can select another.   &lt;br&gt;&lt;br&gt;Thanks for pulling together all the fixes and reposting the source, and for your response as well -  it gave me the faith to press on!&lt;br&gt;&lt;br&gt;Margie</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Margie Roginski</dc:creator><pubDate>Tue, 23 Jun 2009 02:14:36 -0000</pubDate></item><item><title>Re: jQuery Plugin: Tokenizing Autocomplete Text Entry</title><link>http://loopj.com/2009/04/25/jquery-plugin-tokenizing-autocomplete-text-entry/#comment-11597943</link><description>This is in the same line as Richard and Margie's comments:&lt;br&gt;&lt;br&gt;I forked and am carrying along id's in the DOM in my version.  If this project goes under source control, I will submit the (small) changes to the group.  Right now I feel like more contributions are just going to destabilize this tree too much.  OP: thanks for the nice package.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Craig Lebowitz</dc:creator><pubDate>Mon, 22 Jun 2009 22:40:51 -0000</pubDate></item><item><title>Re: jQuery Plugin: Tokenizing Autocomplete Text Entry</title><link>http://loopj.com/2009/04/25/jquery-plugin-tokenizing-autocomplete-text-entry/#comment-11585385</link><description>Hi Margie,&lt;br&gt;&lt;br&gt;The version I'm using with most of the above patches can be downloaded from &lt;a href="http://files.getdropbox.com/u/642364/blogger/scripts/jquery.tokeninput.js" rel="nofollow"&gt;http://files.getdropbox.com/u/642364/blogger/sc...&lt;/a&gt;&lt;br&gt;&lt;br&gt;It's a shame this plugin is not being actively maintained or source controlled as it's quite good (yes, it does what you described, i.e. select multiple users and pass back the ids as a comma delimited string for server-side splitting and processing).</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Richard G</dc:creator><pubDate>Mon, 22 Jun 2009 20:12:53 -0000</pubDate></item><item><title>Re: jQuery Plugin: Tokenizing Autocomplete Text Entry</title><link>http://loopj.com/2009/04/25/jquery-plugin-tokenizing-autocomplete-text-entry/#comment-11584975</link><description>I'm confused!  I am looking for a jquery widget that will let me select a bunch of users via autocompletion and then post their ids back to my database.  The jquery autocomplete doesn't seem give me this, right?  It will autocomplete, but it doesn't collect up all the results (ie, the chosen users) so that I can easily get the data and just post it back to my db.  It seems like this package being discussed here does do that for me.  I see some other similar packages listed at &lt;a href="http://jqueryui.pbworks.com/ListBuilder" rel="nofollow"&gt;http://jqueryui.pbworks.com/ListBuilder&lt;/a&gt;, but can't quite figure out which have which features.&lt;br&gt;&lt;br&gt;Is there a latest version of this somewhere?  Seems like a lot of different people are working on it, not sure where I should download it from to try it out.   Could someone point me to the latest and greatest that I could download?&lt;br&gt;&lt;br&gt;Margie&lt;br&gt;&lt;br&gt;Thanks</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Margie Roginski</dc:creator><pubDate>Mon, 22 Jun 2009 19:57:00 -0000</pubDate></item><item><title>Re: jQuery Plugin: Tokenizing Autocomplete Text Entry</title><link>http://loopj.com/2009/04/25/jquery-plugin-tokenizing-autocomplete-text-entry/#comment-11535407</link><description>For anyone using this on a site that combines jQuery and Prototype, you'll have to change the for.. in.. statements in the prePopulate method to use $.each( array, function(i){...}) as Prototype mangles the Array object and causes the field to be prePopulated with a lot of junk,</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Gordon</dc:creator><pubDate>Sun, 21 Jun 2009 15:31:30 -0000</pubDate></item><item><title>Re: jQuery Plugin: Tokenizing Autocomplete Text Entry</title><link>http://loopj.com/2009/04/25/jquery-plugin-tokenizing-autocomplete-text-entry/#comment-11494902</link><description>I want the id of the selected item is the value of the input in a form to insert data in mysql. is it possible?&lt;br&gt;&lt;br&gt;sorry, my english isn't very good.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Francisco Filho</dc:creator><pubDate>Sat, 20 Jun 2009 02:30:26 -0000</pubDate></item><item><title>Re: jQuery Plugin: Tokenizing Autocomplete Text Entry</title><link>http://loopj.com/2009/04/25/jquery-plugin-tokenizing-autocomplete-text-entry/#comment-11138697</link><description>Your multi-param solution is so much simpler, can't believe I missed it.&lt;br&gt;&lt;br&gt;Would definitely be great to have this under source-control. It's a very useful plugin which people seem keen to maintain. This needs to go on Google Code or something</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Richard G</dc:creator><pubDate>Thu, 18 Jun 2009 20:16:35 -0000</pubDate></item><item><title>Re: jQuery Plugin: Tokenizing Autocomplete Text Entry</title><link>http://loopj.com/2009/04/25/jquery-plugin-tokenizing-autocomplete-text-entry/#comment-11110479</link><description>There was a bug in Richard's multiparam parameter.  I am using the below code to get around the need for such a parameter, it just looks for ? in the url.&lt;br&gt;&lt;br&gt;...&lt;br&gt;var queryStringDelimiter = settings.url.indexOf("?") &amp;lt; 0 ? "?" : "&amp;";&lt;br&gt;$.get(settings.url + queryStringDelimiter + "query=" + query, {}, function(results) {&lt;br&gt;&lt;br&gt;Also, with Richard's code, I am seeing an error when I hit enter after selecting a token with the keyboard:&lt;br&gt;&lt;br&gt;The add_token_from_data is not defined&lt;br&gt;(?)()()jquery.t...ninput.js (line 157)&lt;br&gt;handle()()jquery.latest.js (line 7069)&lt;br&gt;(?)()()jquery.latest.js (line 6844)&lt;br&gt;[Break on this error] add_token_from_data({ id: null, name: name });</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Craig Lebowitz</dc:creator><pubDate>Thu, 18 Jun 2009 14:51:52 -0000</pubDate></item><item><title>Re: jQuery Plugin: Tokenizing Autocomplete Text Entry</title><link>http://loopj.com/2009/04/25/jquery-plugin-tokenizing-autocomplete-text-entry/#comment-11099074</link><description>James, great work and Dirk and Richard, nice patches.  Would you consider putting this under some form of source control to keep track of the changes?</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Craig Lebowitz</dc:creator><pubDate>Thu, 18 Jun 2009 11:02:02 -0000</pubDate></item><item><title>Re: jQuery Plugin: Tokenizing Autocomplete Text Entry</title><link>http://loopj.com/2009/04/25/jquery-plugin-tokenizing-autocomplete-text-entry/#comment-11032533</link><description>I've been going through all the comments and reading up on all the changes/patches people have made to the script. I haven't found a consolidated version of all this, so I tried creating my own with all the code snippets posted by people and some minor tweaks of my own. You can download it from &lt;a href="http://files.getdropbox.com/u/642364/blogger/scripts/jquery.tokeninput.js" rel="nofollow"&gt;http://files.getdropbox.com/u/642364/blogger/sc...&lt;/a&gt; if interested. The changes are as follows:&lt;br&gt;&lt;br&gt;1. Dirk's changes for handling esc/tab keys and bug fixes.&lt;br&gt;2. Nexus setTimeout changes/fixes.&lt;br&gt;3. Nathan's init_list prePopulate method for inserting existing values at load time.&lt;br&gt;4. A new settings parameter, jsonContainer, that specifies the name of the array containing the name/id value pairs in the returned json object. This is optional. Leave it out and it will default to the root object (backwards compatible).&lt;br&gt;5. A new settings parameter, multiParam, that allows you to specify urls with existing parameters. Again, this is optional and backwards compatible if left out.&lt;br&gt;6. Changed the default theme to facebook style. You can uncomment the source to switch back to original.&lt;br&gt;&lt;br&gt;Example usage:&lt;br&gt;&lt;br&gt;$("#prereqAC").tokenInput("/services/index.php?svc_c=UnitSvc&amp;svc_m=listAlphas&amp;svc_f=json", &lt;br&gt;            {&lt;br&gt;                prePopulate: [&lt;br&gt;                     {name:'MATH', id:'1'},&lt;br&gt;                     {name:'CHEM', id:'2'},&lt;br&gt;                ],&lt;br&gt;                jsonContainer: 'data',&lt;br&gt;                multiParam: 'true'&lt;br&gt;            }&lt;br&gt;         );&lt;br&gt;&lt;br&gt;And for anyone reading Dirk's comments about the jQuery UI autocomplete implementation, this can be found at &lt;a href="http://docs.jquery.com/UI/Autocomplete" rel="nofollow"&gt;http://docs.jquery.com/UI/Autocomplete&lt;/a&gt; but is not part of the stable release yet (1.7).</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Richard G</dc:creator><pubDate>Wed, 17 Jun 2009 00:41:10 -0000</pubDate></item><item><title>Re: jQuery Plugin: Tokenizing Autocomplete Text Entry</title><link>http://loopj.com/2009/04/25/jquery-plugin-tokenizing-autocomplete-text-entry/#comment-11031362</link><description>Just installed your plugin on a project I'm working on and would like to say the following:&lt;br&gt;&lt;br&gt;1. Fantastic! Very easy to set up, and works bloody great! (only tested in Chrome so far).&lt;br&gt;&lt;br&gt;2. Please consider adding an option to specify the object name of the json array containing the id/name pairs. My json architecture outputs a structured message across all services. I cannot change this structure just for this plugin. I thus rigged the source to point to a different object in the json respone. Would be good if this can be done from the caller.&lt;br&gt;&lt;br&gt;3. Both the default theme and the facebook theme are great! I chose to use the facebook because it conserves a lot of space. These should be an easier way to specify the theme from the caller, rather than specifying the css class for each element. In my case I rigged the source to use the facebook classes as default, making the whole autocomplete initialization 1 line of html and 1 line of js.&lt;br&gt;&lt;br&gt;4. Keep up the good work!</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Richard G</dc:creator><pubDate>Tue, 16 Jun 2009 23:41:42 -0000</pubDate></item></channel></rss>