locked
EVAL function in EDGE browser is not working RRS feed

  • Question

  • Hi Team,

    I have many java script eval functions which works in IE but not in EDGE.

    Isn't that supported in EDGE?

    Wednesday, July 11, 2018 6:11 AM

All replies

  • Hi Nehal.A,

    You had mentioned that ,"I have many java script eval functions which works in IE but not in EDGE. Isn't that supported in EDGE?"

    You did not posted your sample code, so we don't know how exactly you are executing those Eval Functions.

    At present, I made a test with code below with in IE and EDGE. Both browser gave a same result.

    <!DOCTYPE html>
    <html>
    <body>
    
    <p>Click the button to evaluate/execute JavaScript code/expressions.</p>
    
    <button onclick="myFunction()">Try it</button>
    
    <p id="demo"></p>
    
    <script>
    function myFunction() {
        var x = 10;
        var y = 20;
        var a = eval("x * y") + "<br>";
        var b = eval("2 + 2") + "<br>";
        var c = eval("x + 17") + "<br>";
    
        var res = a + b + c;
        document.getElementById("demo").innerHTML = res;
    }
    </script>
    
    </body>
    </html>
    

    Output:

    I suggest you to post a sample code of those functions.

    we will try to make a test with those functions with in IE and Edge to check the difference in output.

    It can help us to narrow down the issue and then we can suggest you the best possible solution for your issue.

    Thanks for your understanding.

    Regards

    Deepak


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, July 12, 2018 3:12 AM