question

ChienJohnK-5766 avatar image
0 Votes"
ChienJohnK-5766 asked YuZhou-MSFT commented

The eval not working in Edge Browser too

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

ms-edge
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @ChienJohnK-5766

I can't reproduce the issue. I use the code like this and it works well in Edge and IE:
196812-image.png

Is there any error in console in Edge? What is loadContact(289834) in your code? Could you please elaborate more about how you define loadContact(289834) and provide a code snippet which can run and reproduce the issue?

Besides, I suggest that you don't use eval() function. You can refer to the warning in this doc.

0 Votes 0 ·
image.png (12.9 KiB)

0 Answers