window.open from Chrome to IE - javascript

I am working on a MVC application that needs to open a specific URL in Internet Explorer. It works fine when the user is using IE but if the user is using Chrome or Mozilla, window.open uses that browser, as expected since it is most likely the default browser.
Is there any way to force window.open to use IE? The page has to be opened in IE and isn't an option to use another browser.
If there isn't any way to do it using window.open, then is it possible to do another way?

It's called registering an application to a URI scheme think you probably need to rethink the behavior of the app

No, you cannot do this because that means you are in control of the user's device. There is no way to do this from the browser.

If you dont want to open it in new tab then you can use windows.location.href("url").

Related

How to fire "download from another browser" event from chrome? [duplicate]

Our Web application is based on IE9, which means only IE9 can open the pages in our site. We'll prevent user to browse our site when their browser is not IE9.
But sometimes we had to send a link to user's email box to complete some actions and they will open the link directly with their default browser, the problem is here, if the default browser is not IE9 then they can't open the link, they have to copy the link to IE9. Our user don't want do this manually, they want open the link in IE9 directly no matter what the default browser is.
I have tried using ActiveXObject, but it only works in IE. I want have a script which can open IE browser in Firefox/Chrome page.
It sounds like you want to have a link in an email that activates a specific program on the user's computer rather than the program that they've identified should be used (e.g., their default browser). I don't believe you can do that.
You can install "protocol handlers" in both Chrome and Safari (I suspect Firefox as well), which would let you send a link like ie://example.com/path/to/app. Your protocol handler would launch IE and take you to the relevant site. (Apple does this with iTunes.) But your users would have to install the handler (and, of course, you'd have to write it).
An easier answer might be to have the users install any of the ubiquitous "open in IE" add-ons/extensions that exist for Chrome, Firefox, etc. They follow the link, then choose "open in IE" from some kind of menu. (If they're using webmail, they may even be able to right-click the link and choose that line item, depending on the extension.)
Side note: Obviously, though, barring it being impossible I'd recommend making your application compatible with Chrome and Firefox.
No you can't do it..
but there is some alternatives:
Install your users IE tab:
FireFox - http://lifehacker.com/135297/internet-explorer-in-a-firefox-tab?tag=softwarewebpublishing,
Chrome - https://chrome.google.com/webstore/detail/hehijbfgiekmjfkfjpbkbammjbdenadd
Use a batch file that will launch your link in explorer.
use this Firefox plugin makes it possible to use (host) ActiveX controls in Firefox - http://code.google.com/p/ff-activex-host/
instead of ActiveX try using Netscape Plugin Application Programming Interface (NPAPI) - a cross-platform plugin architecture used by many web browsers.
Similar as with a batch file, you may create a link file to the page you need using the ".website" file extension with IE, which is configured in windows by default to open with ie. Put it in your webserver public folder and then add a link to that file in your website
You don't have to write code to create a custom protocol handler in Windows. See this page for how to define one in the registry.
You can use User agent switcher for chrome or firefox
For Chrome :
https://chrome.google.com/webstore/detail/user-agent-switcher-for-c/djflhoibgkdhkhhcedjiklpkjnoahfmg
For Firefox :
https://addons.mozilla.org/en-US/firefox/addon/uaswitcher/

Detect Eddystone-URL directly from Chrome Browser

is there a client based javascript way to detect Eddystone-URL beacons directly from the Chrome browser in iOS?
I know Chrome has the widget for the today view wich works fine, but I need to detect new Eddystones without pulling down the notifcations window.
Say a user clicks on a link provided by the widget, gets redirected to the Chrome app, does stuff, walks around and gets in range from another beacon.
Right now he would have to pull down the tab again to receive the new URI. But I need some sort of notification from within the Browser.
I hope you get the idea.
Thanks in advance!
Cheers
p.
Unfortunately, this is not possible. Understand that Chrome for iOS is just a thin app around the standard native iOS UIWebView, so there is nothing you can do in JavaScript that you cannot do in Safari. And Apple does not implemented any JavaScript bindings to the CoreBluetooth APIs that would be needed to detect Eddystone-URL beacons. The bottleneck is more of an iOS restriction than a Chrome browser one.
Note that this is not true for the Chrome browser on other platforms, notably ChromeOS, which does provide such JavaScript APIs.

Open link from IE to Chrome

Hi maybe this is too easy to ask but i am just thinking if this is possible.
For example i have a button that im a using Internet Explorer then i want its link to Open using Google Chrome? Is this possible? I am using the code below. From Internet Explorer to Chrome browser
$("#myBtn").click(function(){
window.open('https://facebook.com');
});
I have tried the above code using Internet Explorer but as expected the link open in same Internet Explorer. I want to open it in chrome
Nope, not possible.
You can't specify what program to use in either HTML or JavaScript, to open an url.
Technically, in IE ActiveX Objects could open a certain program, assuming ActiveX isn't blocked, and you know the exact path to the application.
So, that still wouldn't work in most cases.

Open Mozilla Firefox Browser using JavaScript

My Application would default start with Google Chrome. When User access one of the Menu Option , I would like to Open
That URL with Mozilla Firefox Browser. Not Google Chrome.
Can someone please help me on the same? Is this possible to Open explicit browser from JavaScript?
Thanks , Niraj Salot.
Which browser is opened is dependant on the users OS (if the browser is present, which browser is their primary etc etc), as such it's not something that can be done through a browser.
It would also be a massive security risk as if a browser could open an external application it would be open to exploits and abuses pretty much from the get go.
About the only permissiable way would be create a plug-in for Chrome which could request from the user if they would like to open the link in another browser, but then thats a alot of work for this.
You'd be better off checking what browser is being used (again since you have no control over which one the users are using) and politely ask that they open the link in firefox.

Is there a way that I can detect if Firefox will open a particular URL in an IE tab?

I have a web page that links to another web application, which unfortunately only completely functions in IE, so, when viewing the original page with another browser (like Chrome or Safari) I display a warning that the application won't operate fully operate unless opened in IE.
Of course, some savvy users of Firefox have the IE tabs extension and have configured it such that the problematic web application always opens in an IE tab. These users would prefer it if my intrusive warning weren't shown for them as it is not necessary.
So, is there a way that my web page can detect that the URL will open in an IE tab? I presume it would require the extension to expose this information somehow as Firefox does not generally allow javascript access to settings for security reasons.
well I am not sure how FF's IE tab works but I assume they share cookies set a cookie when it is IE and check whether it exists and do not show the warning. This will only remove the warning after first usage if my assumption about cookies is correct.
Second is more hacky, use css :visited puseudo styles to detect whether your user has ever downloaded the XPI of firefox tabs.

Categories

Resources