The eval not working in Edge Browser too

Chien, John K 1 Reputation point
2022-04-26T16:44:41.567+00:00

I have following code:

var callF = "window.opener.<%= callback %>('" + selectedValue + "')";
eval(callF);

The callback is "loadContact".

Therefore callF = "window.opener.loadContact(289834)";

It works in IE, but not EDGE

Microsoft Edge
Microsoft Edge
A Microsoft cross-platform web browser that provides privacy, learning, and accessibility tools.
2,152 questions
{count} votes