Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: jQuery Autocomplete

jQuery Autocomplete 4 months 1 week ago #106580

  • g3guy
  • g3guy's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 14
  • Karma: 0
Denis, Tony - thank you for all your help!

This section now works like a charm! (finally tested)

If I have any nit picks it would be that the options "jump" when selected. So as soon as I select my first option, both options shift to the right.
The administrator has disabled public write access.

jQuery Autocomplete 3 months 3 weeks ago #107153

  • lfanfoni
  • lfanfoni's Avatar
  • OFFLINE
  • Gold Lime
  • Posts: 291
  • Thank you received: 43
  • Karma: 12
This script is a fantastic solution! Expecially for italians users...
In Italy we have 110 Province and 8.057 Comuni (cities).
I've adapted the script in order to have a unique ID for cities in each province (3 chars instead 2), beacause in many cases we have more than 100 cities for province.
In this example the lenght of answer code for both scales is fixed at 5 characters (maximum for anser code). First two characters is abbreviation of province (RM is Province of Rome). Lasts 3 characters is the unique ID for both scales, expecially for the Cities, so the maximum number of cities for province now is 999.
I've modified the scritp in the "Substring" arguments. For example:
Old: substring(0, $(this).val().length - 2)
New: substring(0, $(this).val().length - 3)
I attach a sample of this solution, with the modified script (I also commented).
I ask to Denis and Tony the permission to publish the complete solution with the modified script in the italian forum.
Thanks a lot for this discussion/solution.
Luciano

File Attachment:

File Name: dual_scale_filters_5char.lsq
File Size: 22 KB
The administrator has disabled public write access.

jQuery Autocomplete 3 months 3 weeks ago #107158

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6222
  • Thank you received: 791
  • Karma: 238
The script don't have actually a licence ?

MIT surely.... (then yes ... you can copy /paste / adapt / etc ...

And yes : MIT at starting : gitorious.org/ls-selectfilter/ls-selectf...d:selectfilter.js#L3
Last Edit: 3 months 3 weeks ago by DenisChenu.
The administrator has disabled public write access.
The following user(s) said Thank You: lfanfoni

jQuery Autocomplete 3 months 3 weeks ago #107162

  • lfanfoni
  • lfanfoni's Avatar
  • OFFLINE
  • Gold Lime
  • Posts: 291
  • Thank you received: 43
  • Karma: 12
I've added a comment to documentate my modify. This:
/*
Modified Version by Luciano Fanfoni 04/04/2014
Fixed Lenght of both Answer Code (scale 1 & 2): 5
Firsts 2 chars used to filter. Lasts 3 chars used to identify unically options of scale2
Example of Modified code:
Old: substring(0, $(this).val().length - 2)
New: substring(0, $(this).val().length - 3)


Distributed under MIT licence
*/
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Moderators: ITEd
Time to create page: 0.113 seconds
Donation Image