So I have a popup that opens from my home page through a "?" link. I wan run one script (Help.htm) to run if the user is using chrome, FF, Opera etc and a second script (Help_IE.htm) to run if the user is using IE.
js
<script type="text/javascript">
function popup() {
window.open("Help.htm", "Help", "scrollbar=yes,location=yes,width=500,height=420");
}
</script>
html
<a href="javascript:popup()">?</a>
I want to be able to interchange the JS scripts depending on the browser using conditional comments or if anyone has a more efficient answer, i'm open to anything, Thanks.
Attempt
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE9">
<!--[if IE]>
<script type="text/javascript">
function popup() {
window.open("Help_IE.htm", "Help", "scrollbar=yes,location=yes,width=500,height=420");
}
</script>
<![endif]-->
<script type="text/javascript">
function popup() {
window.open("Help.htm", "Help", "scrollbar=yes,location=yes,width=500,height=420");
}
</script>