0

I have this code for forcing a link to open with Chrome:

<script type="text/javascript">
    function openURL(url)
        {
        var shell = new ActiveXObject("WScript.Shell");
        shell.run("Chrome " + url);
    }
</script>

with

<span onclick="openURL('https://google.co.uk/')" value="Open in Chrome">Google</span>

how do I change it to force a link open with IE11

Long story short, company default is Edge but several of the webpages have never been updated and work better with IE11.

I was hoping that I could write it in HTML & javascript

Cheers

Andy M
  • 167
  • 1
  • 3
  • 17
  • 1
    There's not such a way to force the link opening in IE using only html and javascrpt. You need to add a protocol handler to the registry like [this answer](https://stackoverflow.com/questions/40531374/open-internet-explorer-from-chrome-using-a-protocol-handler-ieurl/41749105#41749105). If you're the developer of the website, I think the easiest way is to alert a warning reminding the user to use IE when opening the website. – Yu Zhou Feb 14 '20 at 02:42
  • unfortunately this is for a stand alone web page that I am trying to code. cheers anyway – Andy M Feb 17 '20 at 14:35
  • It seems that you can't force the users to create a protocol handler in the registry. If you can't then I think you can just use a popup to force or suggest the user to use IE 11 when visiting the pages. – Yu Zhou Feb 18 '20 at 06:40

0 Answers0