Enable and Popup blocker in IE - javascript

I wrote a scripting logic in using ActiveX. When the application runs it is blocked by popup blocker. When I enabled it works fine, but I want to enable the popupblocker using JavaScript (especially in IE).

Obviously a website cannot modify the popup blocker settings. And that's a good thing.

You should avoid using ActiveX Controls because it is only supported by IE. Trying running your page on Firefox and it won't work.
Now the actual problem -
Firstly you need to understand what ActiveX Objects are used for? They basically allow a web application to interact with the client machine. For example it can use resources on my local hard drive. This is a security risk. So IE gives a warning for the same. You may disable it in your browser by going to Tools-> Internet Options -> Security Tab. Click "Custom Level" and change all the boxes with ActiveX text in it to "Enable".
But it will still show up in your client browsers.
So the point is try finding an alternative for it.
Hope this helps!

You cant. What you could do is have a message on screen which requests the user to turn off the popup blocker .

Related

How to break out of Twitter in-app browser in Android?

I have a typical modern web-app, regularly shared on Twitter.
I recently noticed that, when opening our web-app in the Twitter internal browser, localstorage is deactivated, which breaks our app.
How could I break out of the Twitter internal browser and open the page in the default Android browser?
I haven't tried this but just a suggestion. You could take a look at this and give it a try.
At the end of the article, it says that the external app won't be invoked if triggered without a user gesture but I believe that the limitation won't be there in case of the In-App browser.
Well, I think it isn't quite easy to say Android via a WebView to open the Chrome Browser as this in-app browser could be a lot different.
What you could try, as mentioned in the article Here is to trigger a click on an anchor which is calling an "pseudo" intent and add the fallback_url .
There isn't much details provided but it could be a possible hack / workaround.
In your HTML
...
And with JS:
$(".open_me").trigger("click");
According to the article
Now the URL will get you to zxing.org if the app could not be found, or the link was triggered from JavaScript without user gesture
(or for other cases where we don’t launch an external application.)
If you're lucky it will open the fallback_url, but as mentioned before it is a WebView which isn't the same as the Chrome Browser, therefore it is possible that nothing happens.
You can use a iFrame in your HTML like this:
<iframe src="url.com" width="900" height=400"></iframe>

window.clipboardData permissions

I'm creating web application on ASP.NET WebForms, and one of my tasks is copy/paste data to excel from web page. I/m using window.clipboardData, and it works for my user (local admin). But for other users it doesn't work. How can I fix it? Thank you.
This is a browser level permission, that need to be set depending of the browser.
In the documentation of your application you need to specify where and how to enable it on the browser.
I recommend you to explore each browser options, for your documentation.
For Internet Explorer you can go to Internet Options>Security>Add the Website/link to the trusted sites (Make sure https checkbox is checked, if your website is not using https). After adding it, go to Custom Level in the same window. It will pop another window, you can explore all the options for any other think you may need. The option to allow access to clipboard show be "Allow Programmatic clipboard access" and set it to enabled.
It may be a ActiveX Control that can make it automatically, but will work only for Internet Explorer.

Why IE8 blocking a pop-up window which appears in IE7?

I am working on a client server application,in which we open client on our pc by URL:http:\[ip of server]:[port no].
My application start by using the URL mentioned in IE, and one pop-up comes in which we perform every action of the apllication and original window we can close as they are only for starting. One of my customer is using IE8 and he is facing a problem in which after clicking on save to bookmark the pop-up is not coming and hence not able to save. In IE7 pop-up as an another window is coming and giving the option to save.
What is blocking the pop-up? Thanks in Advance...
For popups the same goes as for spam email - as the popup developers get smarter, so do the popup blocker developers. As such it makes sense that newer browser versions are stricter in the rules they evaluate to determine when a popup needs to be blocked.
All modern browsers follow the same rules, that all boil down to "popups are only allowed if the user directly initiated them". This means that they guard execution paths, and every call to window.open is caught by the popup blocker unless it can be directly traced to a user action. And as popup developers invented more inventive ways to make a browser think the user initiated it, popup blockers got more inventive in detecting them.
A quite plausible explanation is also that you are developing on a LAN, where IE applies lower security settings by default, allowing more user popups automatically. We cannot see that from your post though.

Javascript code to force html page to open in Chrome browser?

We are using Google Apps at our company and everyone has Chrome installed on their computers. The problem is that we still have to use IE for certain things. I have a few html files on our intranet site that link to Google Docs, but it's opening in an IE browser. I need it to open a Chrome browser so the user doesn't have to sign in each time they open the file. I only have control of the html files settings so is there any way to use Javascript to force a window to open in Chrome?
Thanks!
I believe that if you're using IE you can use ActiveX to open up specific programs.
For instance try looking at 'new ActiveXObject'
You must explicitly allow this however as IE confirms if you want to allow it to be executed.
function loadProg(path){
var active = new ActiveXObject("WScript.Shell");
activeX = active.Run(path);
}
If you know the direct file path use this like
loadProg(path);
More specifically like
window.onload = function(){
loadProg("\"C:\\Program Files (x86)\\Guitar Pro 5\\GP5.exe\"");
};
I don't know the path to Chrome so i used something else instead.
Check if current browser is chrome:
var is_chrome = navigator.userAgent.toLowerCase().indexOf('chrome') > -1;
if not, alert user to show a message.
Are you asking if you can open a Chrome window from Javascript in an IE window? If so, then no, this is not possible. Javascript code in browsers run within a very strict sandbox that would not permit you to make any system calls. Opening a Chrome window from IE would effectively require you to execute chrome.exe on the client's machine. I'm sure you can see how this ability, if granted, could be misused to execute malicious exe's on the client' system.
I am quite sure that the best you can do using JavaScript is show a message to the user and tell them to open the file in Chrome instead. JavaScript does not have the right to execute an external application such as Chrome. See http://www.w3schools.com/js/js_browser.asp for information about detecting the browser using JavaScript.

Javascript force open a link in a browser

Is there a way to do object detection from JavaScript and force open a link in a specific browser?
For eg: Open in IE, Open in Firefox
No. Definitely not without some browser plugin. This would be a huge security risk if it were possible.

Categories