I have a web application that I'd like to implement the following behavior.
When you click on a specific link:
If the user has more than one monitor - open the url in a window with a given name.
Otherwise - change the iframe's src attribute to that of the url.
How do I detect the monitor count in JavaScript?
If it's impossible, a Chrome only solution would also work since this is for an intranet app.
As others have said the only sensible way to do this is to ask the user. A proposal to allow this has been raised and declined before. Multi monitor setups are not very common in the general population which is why this is ignored.
The alternatives are:
Overall - for normal websites the only option is to prompt the user.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With