Willkommen, Gast
Benutzername: Passwort: Angemeldet bleiben:
  • Seite:
  • 1
  • 2

THEMA: jQuery Autocomplete

jQuery Autocomplete 7 Monate 3 Tage her #106580

  • g3guy
  • g3guys Avatar
  • OFFLINE
  • Fresh Lemon
  • Beiträge: 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.
Der Administrator hat öffentliche Schreibrechte deaktiviert.

jQuery Autocomplete 6 Monate 2 Wochen her #107153

  • lfanfoni
  • lfanfonis Avatar
  • OFFLINE
  • Gold Lime
  • Beiträge: 303
  • Dank erhalten: 46
  • 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

Dateianhang:

Dateiname: dual_scale_filters_5char.lsq
Dateigröße: 22 KB
Der Administrator hat öffentliche Schreibrechte deaktiviert.

jQuery Autocomplete 6 Monate 2 Wochen her #107158

  • DenisChenu
  • DenisChenus Avatar
  • ONLINE
  • Moderator Lime
  • Beiträge: 6451
  • Dank erhalten: 844
  • Karma: 249
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
Letzte Änderung: 6 Monate 2 Wochen her von DenisChenu.
Der Administrator hat öffentliche Schreibrechte deaktiviert.
Folgende Benutzer bedankten sich: lfanfoni

jQuery Autocomplete 6 Monate 2 Wochen her #107162

  • lfanfoni
  • lfanfonis Avatar
  • OFFLINE
  • Gold Lime
  • Beiträge: 303
  • Dank erhalten: 46
  • 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
*/
Der Administrator hat öffentliche Schreibrechte deaktiviert.
  • Seite:
  • 1
  • 2
Moderatoren: ITEd
Ladezeit der Seite: 0.139 Sekunden
Donation Image