javascript or html to open link in chrome

Could someone give me a method using js or html to create a link that will open in chrome (IE is the default browser for our company)  I have been researching and as far as I can tell there is no method.
tike55Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dustin SaundersDirector of OperationsCommented:
In IE you can create a shell object and run the browser.  You would probably need to push out some changes via GPOs to enable it (ActiveXObject) safely for users.

<html>
	<head>
		<script type="text/javascript">
			function openInChrome(){
				var shell = new ActiveXObject("WScript.Shell");
				shell.run("Chrome http://www.experts-exchange.com");
			}
		</script>
	</head>
	<body>
		<input type="button" onclick="openInChrome()" value="Launch Experts Exchange">
	</body>
</html>

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ste5anSenior DeveloperCommented:
You can try as Dustin wrote, but consider an user having an other browser, which don't necessarily support  new ActiveXObject(). So in short, there is no general solution.

But I have to admit as long as you don't use specific, brand new HTML5 API's then just place a simple toast on your page, which tells the user why he should use Chrome instead of his browser. And use polyfills for the rest.
0
Dustin SaundersDirector of OperationsCommented:
That's a fair point, and a good note.  Despite IE being the default browser if some user launches in a different one your link won't do much.

Depending on what you're trying to do (is there a reason you have the link on the page, something like a default intranet site?), you can always go the old school desktop shortcut route to link to chrome followed by a URL string.
0
Dustin SaundersDirector of OperationsCommented:
Working code on how to launch Chrome via IE.

Additional advice and consideration from experts.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
HTML

From novice to tech pro — start learning today.