0
<script type="text/javascript">
   
    function EdgeCheck(){
        var edge1;
    var edge2;
    var sBrowser;
    edge1 = window.navigator.userAgent.indexOf("Edge") > -1;
    edge2 = window.navigator.userAgent.indexOf("Edg") > -1;
    if  ((edge1) || (edge2)){
    sBrowser = 'You are using Edge Browser';
    //alert(sBrowser);
    }
    return sBrowser;
    }    
</script>

<% response.write("<b><font size='6' color='#008080'>" + '<script>EdgeCheck();</script>' + "</font></b>") %>
5
  • 1
    Are you sure that the function isn't being called at all, or is it just not printing the returned text? Commented Jul 7, 2020 at 14:36
  • Calling a JS function from ASP? You know ASP is a server-side language and JS is a client-side language, right? These two languages execute at different times and on different machines, they have no business with each other Commented Jul 7, 2020 at 14:39
  • Does this answer your question? What is the difference between client-side and server-side programming? Commented Jul 7, 2020 at 14:39
  • As kenput3r said above are you actually calling the JS at all or are you not just printing out <script>EdgeCheck();</script>. Have a look at stackoverflow.com/questions/16410968/… to se the cotrrect way to call the JS.. Commented Jul 7, 2020 at 14:57
  • It is calling the function. When I uncomment the alert the alert pops up Commented Jul 7, 2020 at 15:25

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.