I have a website on my panies intranet which needs to be displayed over 2 monitors. At the moment, the user logs in and is redirected to the first page, with an instruction to click a certain link to open another page in a new window and drag it onto their second monitor.
What we would like is the user to log in, be redirected to the first page as usual, but have the other page automatically open on the other monitor in a maximised browser window.
Normally I would refuse to do this, but this is an internal use only site, and our users are expecting it to happen.
Is there a way of doing this? I am an html guy and anything beyond that, is beyond me.
I have a website on my panies intranet which needs to be displayed over 2 monitors. At the moment, the user logs in and is redirected to the first page, with an instruction to click a certain link to open another page in a new window and drag it onto their second monitor.
What we would like is the user to log in, be redirected to the first page as usual, but have the other page automatically open on the other monitor in a maximised browser window.
Normally I would refuse to do this, but this is an internal use only site, and our users are expecting it to happen.
Is there a way of doing this? I am an html guy and anything beyond that, is beyond me.
Share Improve this question edited Apr 4, 2016 at 13:20 user3942918 26.4k13 gold badges56 silver badges68 bronze badges asked Apr 4, 2016 at 13:19 Ian WilliamsIan Williams 552 silver badges8 bronze badges 2- Possible duplicate of Make Chrome open on second monitor? – C.Liddell Commented Apr 4, 2016 at 13:22
- 1 Simply not possible here you are not opening new chrome just opening new tab; – itzmukeshy7 Commented Apr 4, 2016 at 13:25
3 Answers
Reset to default 2Yes you can sort of do this, although it would have to be very adhoc and user centric as you will have to set it up for the explicit scenario. It would also take some tinkering to get your position and size right.
Here's a concept example using the window.open()
method. Sorry there's no way you can you do it with just html/css. Pay attention to the left
and other attributes set as they're what you'll be tinkering with. See the documentation for more information.
CODEPEN
Example function;
function iLikeToMoveItMoveIt() {
window.open("http://www.stackoverflow.",
"_blank",
"toolbar=yes, scrollbars=yes, resizable=yes,
top=500, left=800, width=1000, height=1000");
}
And an initiation;
<button onclick="iLikeToMoveItMoveIt()">
HEY LET'S OPEN A WINDOW SOMEWHERE!
</button>
Hope this helps, cheers.
ADDENDUM:
Fire off the function on page load then..
<script>
window.onload = iLikeToMoveItMoveIt();
</script>
I had a similar task - when opening a listing, display details on other monitor.
I solved it using localStorage
.
I basically had localhost/sender
opened on one monitor, localhost/receiver
on the other and when user clicked on something in sender
, localStorage
changed and a listener in receiver
handled it (by sending AJAX requests).
For an extremely simple example, if you enter something in this JSFiddle sender, you should see changes made at realtime in JSFiddle receiver (just make sure to 'Run' them both).
I don't think there is a simpler way, you would need to handle fullscreened windows and different resolutions and whatnot.
Confirmed that popping up a new browser window on a second display CANNOT be done anymore.
When I was researching at the beginning. Many JavaScript forums had codes shown to do this and detailed how to detect the second monitor, which dated mostly from 2012 to 2018. So I thought this feature was doable and with so many years passed it would only get easier to implement.
However, when I tried to detect the width and height of a second display it could never find it no matter how I tweaked the codes. I thought JavaScript function names might have changed or it became browser-dependent. So I kept on searching and experimenting but none worked.
Eventually, I tried instead to push the pop-up browser window out of the current display to left and right, without regards of the second display's resolution, then I found out that the pop-up windows always stayed on the left or right edge of the current screen no matter how far off you tried to push it. This well-formed feature gave me a hint that this limitation (not passing the boundaries of the current display) might just be a built-in feature within the browser on Windows platform.
Knowing this fact, further searches in a different direction brought me other users' experiences in more recent years and confirmed that those JavaScript functions detecting a second display would not work anymore on Windows 10 platform at least dating back in 2019 on Windows 10 platform.
Maybe this restriction is now considered a security necessity because a browser is largely dealing with unknown users from the Internet and it should naturally be limited on what it is allowed to detect and access on the puter’s properties. It's now the end of 2022, so I might just conclude that this kind of pop-up on second display implementation is a dead-end.
(I know there are already specialized sign-off devices on the cashier's counter top in large department stores but those are essentially provided by payment system providers, which require purchase and installation of separated software/hardware/devices. This would not be desired as we have already had a web application that is fully handling the entire ordering processes from start to finish. Our sign-off feature is just a new requirement.)
I considered Somrlik's solution using AJAX but it requires a call to check every 5 seconds or so which is quite a work load for a process happens only 5 to 10 time during the whole day of opening hours (not all sales require a signature). Moreover, it also requires a dummy web page opening all the time to stand by on the customer facing display which should be blank most of the time. Therefore, this solution may not apply in my situation.
I wish I were wrong with all this and someone could point me a way to implement this because I do have a need to pop up a separated web page on a second display facing customers for them to sign off an order when a sales person clicked a "Sign Off" button on the ordering page on her sales puter screen.