Faced with an incomprehensible problem: in Internet Explorer, autocomplete does not want to work out normally, although in other browsers all the rules.

Console shows

SCRIPT5009: 'oStreet' is undefined
eval code (39) (1,1)

In IE it is not possible to skip and select the street in the drop-down list - the choice is possible only with the up and down arrows. The browser can hang at all.

What could it be? Why eval?

upd: type problem here => setTimeout ("oStreet.parent (). addClass ('ok');", 50);

  • one
    everything is obvious: 'oStreet' is undefined - Grundy
  • Where in 2016 do you want to send a string to setTimeout ? This method is outdated by 10 years ... - Pavel Mayorov

1 answer 1

oStreet - must be in the global scope. Assign as window.oStreet. Or pass the function to setTimeout.

 setTimeout(function(){ oStreet.parent().addClass('ok'); }, 50);