Author Topic: Dropdown autocomplete Case Sensitive  (Read 4489 times)

rgorantla

  • Pro Deluxe
  • Jr. Member
  • *
  • Posts: 88
    • View Profile
Dropdown autocomplete Case Sensitive
« on: September 29, 2014, 08:32:20 pm »
Hi,

Can we make autocomplete text box case insensitive ?

Ex: I have ABC in a dropdown and when i am trying to enter abc it is giving me an error


Thanks,
Roseline.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6126
    • View Profile
Re: Dropdown autocomplete Case Sensitive
« Reply #1 on: September 30, 2014, 02:02:10 pm »

rgorantla

  • Pro Deluxe
  • Jr. Member
  • *
  • Posts: 88
    • View Profile
Re: Dropdown autocomplete Case Sensitive
« Reply #2 on: September 30, 2014, 06:39:45 pm »
Hi,

I have exactly as in the demo , but still the autocomplete textbox is case-sensitive.

rgorantla

  • Pro Deluxe
  • Jr. Member
  • *
  • Posts: 88
    • View Profile
Re: Dropdown autocomplete Case Sensitive
« Reply #3 on: September 30, 2014, 11:15:02 pm »
It is happenig in your demo too :

http://paramquery.com/pro/demos - type in books cell in a row "actionscript" all lower case - it says not valid - CASE SENSITIVE.

Any way to get this work without being case sensitive?

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6126
    • View Profile
Re: Dropdown autocomplete Case Sensitive
« Reply #4 on: October 01, 2014, 12:03:57 am »
Please check the Ship Country column in that demo.

rgorantla

  • Pro Deluxe
  • Jr. Member
  • *
  • Posts: 88
    • View Profile
Re: Dropdown autocomplete Case Sensitive
« Reply #5 on: October 01, 2014, 12:07:06 am »
yeah ship country i understand , data is coming from Json
- but in my code for now , drop downs are in the format of books not country list ... is there any way o make it work for books?

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6126
    • View Profile
Re: Dropdown autocomplete Case Sensitive
« Reply #6 on: October 01, 2014, 12:12:55 am »
Please use a for loop instead of $.inArray and use toUpperCase() or toLowerCase() method on both sides of equality operator (==) while comparing the values.

rgorantla

  • Pro Deluxe
  • Jr. Member
  • *
  • Posts: 88
    • View Profile
Re: Dropdown autocomplete Case Sensitive
« Reply #7 on: October 02, 2014, 07:59:55 pm »
could you please help me with any example?

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6126
    • View Profile
Re: Dropdown autocomplete Case Sensitive
« Reply #8 on: October 02, 2014, 11:38:26 pm »