<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>") %>
-
1Are you sure that the function isn't being called at all, or is it just not printing the returned text?kenput3r– kenput3r2020-07-07 14:36:09 +00:00Commented 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 otherJeremy Thille– Jeremy Thille2020-07-07 14:39:14 +00:00Commented Jul 7, 2020 at 14:39
-
Does this answer your question? What is the difference between client-side and server-side programming?Jeremy Thille– Jeremy Thille2020-07-07 14:39:51 +00:00Commented 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..mkane– mkane2020-07-07 14:57:40 +00:00Commented Jul 7, 2020 at 14:57
-
It is calling the function. When I uncomment the alert the alert pops upuser1345246– user13452462020-07-07 15:25:24 +00:00Commented Jul 7, 2020 at 15:25
Add a comment
|