Author Topic: autocomplete doesn't work in IE7  (Read 3447 times)

stoodin

  • Pro Enterprise
  • Jr. Member
  • *
  • Posts: 85
    • View Profile
autocomplete doesn't work in IE7
« on: April 14, 2014, 12:31:40 am »
Hi guys,
I am using your demo autoCompleteEditor. Your demo works fine in IE7, but when I copy the code into mine I have the same problem as in http://paramquery.com/forum/index.php?topic=355.msg2574#msg2574 Exact same error raises only in IE7.
Since it is not required functionality I commented it but then I am getting error from jquery-ui.js
"Line: 2584 Error: 'label' is null or not an object"
on line: return matcher.test( value.label || value.value || value );

It works just fine in Chrome but I must support IE7.
All your help is very appreciated.

Thanks a lot

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6296
    • View Profile
Re: autocomplete doesn't work in IE7
« Reply #1 on: April 14, 2014, 01:25:50 pm »
That error can be get rid of by using

Code: [Select]
  $(this).data("uiAutocomplete").search($(this).val());

Which version of jQuery/ jQueryUI are you using.

stoodin

  • Pro Enterprise
  • Jr. Member
  • *
  • Posts: 85
    • View Profile
Re: autocomplete doesn't work in IE7
« Reply #2 on: April 14, 2014, 06:44:23 pm »
The "Line: 2584 Error: 'label' is null or not an object" still appear and it doesn't show any predicted text when I ignore it.
I am using 1.10.4 jquery. I tried to point to the same version of jquery as in your example but it didn't help.
Same error.
Any ideas where I can look to resolve it?

stoodin

  • Pro Enterprise
  • Jr. Member
  • *
  • Posts: 85
    • View Profile
Re: autocomplete doesn't work in IE7
« Reply #3 on: April 14, 2014, 07:06:32 pm »
I found a solution.
Thanks a lot guys.
I fixed my problem. The problem was in my data array. It had an extra "," at the end, which IE thinks is an extra element of the array. It started to work as soon as I removed it. 
  var woHistory = [
          "123456",
          "374830",
          "409287",
          "546738",
          "943829",
          "298375",
          "668949",
        ];