I have written a JSP page in my application and it is opening automatically in Internet explorer even when I try to access the page in chrome after deploying the application however when I run it locally it runs in chrome. In the page I have used the following javascript files :
https://code.google.com/p/rangy/source/browse/trunk/dev/uncompressed/rangy-core.js?r=640
https://searchcode.com/codesearch/view/12090631/
Is there anything in javascript that can force a page to open in IE only ? Looked around for solution with no luck. Please help!
Before following the deployment process, set your default browser settings in Eclipse:
Setting the Default Web Browser
The usage of Stardust Portal via the internal Web browser is currently
not supported. Set the browser to be used to your default Web browser:
Select Window > Preferences in the main menu
Select General > Web Browser
Enable Use external Web browser
Click Apply
http://help.eclipse.org/kepler/index.jsp?topic=%2Forg.eclipse.stardust.docs.wst%2Fhtml%2Fwst-integration%2Fdeployment.html
Related
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/
I am just developing an Outlook Web Add-In. I suppose that Microsoft uses Internet Explorer 11 which is embedded in the Outlook 2016 desktop client. Is there a possibility to change this to another browser, for example Chrome.
I also open a new browser in JavaScript (window.open) which is again Internet Explorer 11. In this case I want to change the browser too, e.g. Chrome.
Answer to first question - You cannot change the browser in which the addin is loaded inside Outlook Desktop.
Answer to second question - If you are trying to open a url specified in your appDomains(in the manifest) then it would open in IE to allow communication back to the addin.
If you are trying to open just any random url which does not need to communicate back to the addin and not specified in your app domain then it will open in the default browser (set by the user for the device).
For the scenario where you want communication between the new window and addin we suggest using the displayDialogAsync API instead of window.open. You can find documentation about it here: https://dev.office.com/reference/add-ins/shared/officeui.displaydialogasync?product=outlook&version=v1.5
We currently have an Cordova application that needs to start an external browser with a POST.
We have it coded to use the inAppBrowser plugin to start a browser that is embedded within the app.
I don't like using the internal browser because I will be blamed for any bugs in the webpage that render in the default browser and don't work in the inAppBrowser.
How can we start the default browser with a POST request?
Once the browser starts we do NOT need to have a back button in the browser that will take the user back to our app.
We are only worried about iOS and Android. We can use different solutions on each of those platforms.
I have googled but there is so much conflicting information; there will be a response that it works, then another person replies that it does not. There also caveats to getting it to work; for instance, it seems that one can get the URL to open in the default browser, but it also leaves the page open in the in-app-browser as well. This would be confusing for the end user.
[EDIT] I have created an upwork.com project to pay someone to create a cordova plugin specific for starting the external browser with a POST request. Feel free to comment on any anticipated problems with doing that.
[EDIT] Here are the steps I used to test on iOS:
clear all background tasks on iPhone
Start the app that has link intended to start external browser
click the link that is intended to start external browser
Observe that browser starts
double tap the home key to expose all running apps
if successfully running in default browser I should observe the original app and the browser running.
if successful we should also observe that the original app is not displaying the target webpage. This point is important because some people are able to start the default browser, but the original app is left in the state of having the webpage also displayed.
Looks like the "_blank" can not open url in external browser on iOS.
I tried by this:
1) Install inappbrowser plugin.
2) call window.open(encodeURI('https://openclipart.org/'), "_blank");
when button pressed.
The url open in app, not external browser.
Update:
Use "_system" will open url in Safari on iOS, to open url :
1) Install inappbrowser plugin.
2) call cordova.InAppBrowser.open(encodeURI('https://openclipart.org/'), "_system");
Unfortunately this way only work to send get request.
Some people suggest submit post form on loadstop event like this:
Cordova InAppBrowser post form to url
The method worked when target is "_blank", when target is "_system", because open url in browser not app windows, the loadstop event will not be fired.
You can open a browser outside of the app with inAppBrowser by specifying the target eg.;
var linkTarget = "_blank" ; ( was using for desktop ; had coded target as _system for Android. Apologies.)
[EDITED]
openclipart.org;
This doesn't open web page in the app - opens in system browser.
If the browser defaults have been cleared in the device settings app manager page this link will prompt the user for their choice of browser ( I'm assuming it otherwise uses the previously set default though you might want to double check particularly if you're using crosswalk )
There are other target options but seem to recall _system not working as expected - give it a try if _blank doesn't work
I don't think there's any straight forward way to launch a browser doing a post even if you had a special plugin ;
Looks like using a dataUrl might allow you to open browser doing a post - if so prob the cleanest approach. ( see link in Wu's answer below ) [EDIT] looks like won't work on Windows mobile platforms though; see caniuse dataURIs.
Alternatively, you might try a separate html file as part of your app files - load it into a new browser as above (except "file://.." )and have it run some startup javascript (maybe using a querystring for control) to do the post eg. via a jquery ajax call. There will be security issues with this approach - the file will have to be somewhere the browser has access to ( can have app copy it there from internal www folder - need read/write permissions ) . Not sure if there will be CORS issues etc. I'd definitely look into the dataUrl first if windows not a consideration.
I am doing a POC whose requirement is quite unique.
We are running SAP netweaver portal 7.3 and the client requires the exact desktop version to be opened in ipad.
Due to rendering issues some portal short links(links to direct application inside the portal rather than the homepage) need to be opened in Chrome and others in Safari. Majority of application is to be opened in Chrome.
For that i have designed a simple HTML page containing hyperlinks to the above mentioned hyperlinks. For Chrome links i use the following-
var hname=<host>+"/<app name>";
location.href="googlechrome"+hname.substring(4);
is the portal landing page- http://myportal.corporg.net/irj/portal
is the short link to the app inside the portal.
The final working url is like- http://myportal.corporg.net/irj/portal/myapp
With the googlechrome:// i am able to trigger the link to be opened in Chrome from Safari. But it loads in mobile version.
But this portal does not support mobile versions as per vendor specs and hence throws a compatibility error which is a part of the portal error handling. upon choosing the desktop version, the app starts working.
The requirement is somehow to trigger the desktop version, when the URL is called either via javascript in the bookmark page(the javascript snipped shared above) or via any url parameters.
NOTE- There can be no change in the device software like rooting etc. These are only ipad air 2 devices.
Restriction- The corporate portal can not be changed as well. We cannot change any codes in the portal as well. it has to be either via javascript or via url parameters.
Is there anyway this can be done
I’m developing a small web app, and I want to add a ‘close’ button.
The app runs inside Chrome window, and runs from a desktop shortcut (there's no opening window).
I’m using AngularJS on client side & NodeJS backend.
Every solution I've tried:
$window.close();
$window.self.close();
$window.open(‘’, ‘_self’, ‘’); $window.close();
Returns this error:
"Scripts may close only the windows that were opened by it."
Any other creative idea how to bypass/hack this restriction without setting the browser’s configuration?
Thanks.