0

Let me preface this by saying, this is for an enterprise application. So don't worry about the usual client side limitations and issues of a normal website. Been racking my head for days to no avail. So I'm resorting to here in hopes someone can solve this.

What I need to do: Launch a url in chrome that always loads in the same chrome browser window. This can be done from command line or from another chrome window(preferably JS, but I am open to ideas)

The issue: An inbuilt security feature in chrome (works fine in IE) prevents javascript from launching full fledged new windows without user interaction to initiate it. What you get instead is a locked down window that ignores the target window you are trying to launch to. By locked down window, I mean no toolbar, can't edit the url, and it ignores the target parameter. No error is thrown.

Chrome Version 37.0.2062.120 m

Locked down window

None of the command line options I tried work, maybe I missed one that would fix it though.

Here is the PoC code that works in IE but not Chrome: html launched via command line in chrome:

<HTML>
    <BODY>
        <SCRIPT type="text/javascript">
            var win = window.open("landing.html", "CustomTarget");
            window.close();
        </SCRIPT>
    </BODY>
</HTML>

I'm very good a JavaScript, but very little in stuff like jQuery. I am open to using them, just please explain them well. Any help is greatly appreciated. All the best!

Michael
  • 522
  • 2
  • 12
  • I'm confused about your question. you have an application on the user's computer in IE and you want to cause a page to load inside their Chrome instance? – lukevp Nov 07 '14 at 21:20
  • You can not open a window because of the pop up blocker in the browser. – epascarello Nov 07 '14 at 21:21
  • @epascarello It is not a popup blocker. It is a chrome security feature that locks down new windows launched without user action. – Michael Nov 07 '14 at 21:57
  • @lukevp We already accomplish that through browsium. Additionally we need the application launched in chrome to reused it's window. The code I posted works in IE. We need to do exactly that in chrome. But chrome has an inbuilt security feature that locks down new windows that are launched without user action. Maybe too much info there, I will simplify it. – Michael Nov 07 '14 at 22:01
  • Any screenshots or error messages from the "chrome security feature"? If any, please update the question accordingly. – cychoi Nov 07 '14 at 22:05
  • 1
    @Kenji " It is a chrome security feature that locks down new windows launched without user action." That sounds like the definition of a pop up blocker. – epascarello Nov 10 '14 at 15:00
  • @cychoi No... it just gives you a locked down window instead of a normal one. – Michael Nov 10 '14 at 15:01
  • @epascarello Again, this is a corporate enterprise environment, we do not have any pop up blockers installed, and the chrome popup blocking option is disabled. The window opens, it is just locked down. – Michael Nov 10 '14 at 15:04
  • What is a "locked down window"? How does it look like? If we can't understand what you mean by words, why not take a screenshot or even a screencast? Anything refraining you from doing that? – cychoi Nov 12 '14 at 07:57
  • @Kenji currently it seems you can't have toolbar, editable urlbar, etc for Chrome and there would not be any workarounds. What are you exactly trying to do? Why do you need to use `window.open()`? Probably there would be other solutions for your purposes. See the relevant information from the web: http://stackoverflow.com/questions/11999837/force-window-open-to-create-new-tab-in-chrome http://stackoverflow.com/questions/15818892/chrome-javascript-window-open-in-new-tab https://code.google.com/p/chromium/issues/detail?id=82522 – cychoi Nov 15 '14 at 10:18

0 Answers0