window.open on second monitor
Asked Answered
P

1

8
window.open('branchMonitoring/', 'Testing Dual Monitor', 'resizable=1, scrollbars=1, fullscreen=0, height=200, width=650, screenX=0 , left=1280, toolbar=0, menubar=0, status=1');

I used this code to open a new window on second monitor but the new window still opens on first monitor and cannot exceed the first monitor's boundary. I tried to change "left" to a higher value but still no luck.

Please help me brothers. i am using latest google chrome browser and using windows 8 dual monitor.

Please do note that this solution works for me when using FireFox browser. But I need to get it work on chrome.

Purpura answered 10/2, 2014 at 8:23 Comment(5)
JavaScript cannot know where your second screen is located at though.Communistic
possible duplicate of How do I get JavaScript to open a popup window on the current monitorDrawbridge
@Derek朕會功夫 i think you can position the newly opened window by setting "left" attribute. but when I set it to 1280(my primary monitor's width) the window is still stucked at the first monitor.Purpura
brothers i found some remedy on my prolem.Purpura
see https://mcmap.net/q/355856/-what-needs-to-be-done-to-make-multiple-screen-support-for-javascript-happen how you can select a monitor with presentation-api in chrome and potentially other browsers.Flytrap
P
2

After doing many researches, I found some remedy. Some are saying that this is a bug on chrome.

please refer too this link. https://mcmap.net/q/358627/-window-open-on-the-second-monitor-in-chrome

And also if you are targeting to create an admin/internal application, you can try Chrome App. It offers functions like, window.create() with position parameters. You can control the position of the windows you created. Remember that you have to install the Chrome App you created in user's browser, just like in extensions.

Purpura answered 10/2, 2014 at 9:20 Comment(1)
Chrome Apps are now deprecated by Google.Limelight

© 2022 - 2024 — McMap. All rights reserved.