0

I am getting the error Syntax error, unrecognized expression: [name*="myControl" i] error in Edge, but the page works correctly in Firefox and Chrome.

The jQuery which is causing the error is

function resultSelected(targetControlName, value) {
   $('[name*="' + targetControlName + '" i]').val(value);
}

The element which calls that function is

<a onclick="resultSelected('myControl','12345')" href="javascript:void(0)">12345</a>

I'm using jQuery 3.1.1

Ben Rubin
  • 6,909
  • 7
  • 35
  • 82
  • Edge doesn't support case-insensitive attribute selectors. Do you really need case-insensitivity? – Ry- Jun 21 '17 at 14:00
  • Related: https://stackoverflow.com/questions/19465157/case-insensitive-jquery-attribute-selector – Peter B Jun 21 '17 at 14:03
  • Thanks @Ryan, that's good to know. I don't absolutely need the case insensitivity, but I'd like to have it. I'll try the `filter` method of doing it. – Ben Rubin Jun 21 '17 at 14:07
  • Thanks for the link @PeterB. I'll do it like that. – Ben Rubin Jun 21 '17 at 14:08

0 Answers0