Star Gates
Star Gates

Reputation: 123

from chrome, i want to launch google in IE

I Want to: from chrome i want to launch google.com in IE.

Issue: when i run in chrome, google doesnt open. but if i am using IE, than google open up in IE

    <Script>
        function openURL(){
            var shell = new ActiveXObject("WScript.Shell");
            shell.run("iexplore http://google.com");
        }  
     </Script>

    <a onclick="openURL()" href=""> test </a>

Upvotes: 0

Views: 159

Answers (2)

Robiot
Robiot

Reputation: 98

If this is just for you then you could create a custom protocol to open up internet explorer like you can do with the windows 10 calculator Calculator://

Then you would be able to launch it in plain html

<a href="yourprotocolname://">Open Internet Explorer</a>

Calculator example:

<a href="Calculator://">Open Calculator</a>

https://support.shotgunsoftware.com/hc/en-us/articles/219031308-Launching-applications-using-custom-browser-protocols

You may also want to take a argument as a website to open somehow

Upvotes: 0

Reece
Reece

Reputation: 549

The reason why this works in Internet Explorer (IE) and not Chrome is because ActiveXObject is not a web standard, and is only supported by IE. What you're asking for is unfortunately not possible at this time.

Upvotes: 1

Related Questions