1

I am designing an emergency response page, which needs to display information across 3 different monitors. The first monitor will gather information about the caller, and then contain 2 links. The first link needs to display a different web page on the 2nd monitor, and the 2nd link needs to display a different web page on the 3rd monitor.

Is this possible?

Thanks for any help

Your Common Sense
  • 156,878
  • 40
  • 214
  • 345
Daniel H
  • 2,865
  • 8
  • 34
  • 32

4 Answers4

0

You can open the links in a different window with the attribute target="windowName".

You have to set up the three windows manually, so assign them manually to the three screens. When you open a link again in a window it is still on the same screen.

sauerburger
  • 4,569
  • 4
  • 31
  • 42
0

Have a look at Java: Getting resolutions of one/all available monitors (instead of the whole desktop)?

(The answer discuss the GraphicsEnvironment.getLocalGraphicsEnvironment() call)

Community
  • 1
  • 1
Thorbjørn Ravn Andersen
  • 73,784
  • 33
  • 194
  • 347
0

If you really want the windows to be locked to a specific monitor, you will need to implement this client side. Here is a link describing how to detect which monitor a window is on in Java, so you can move it to the proper monitor and maximize the window if you desire. Obviously you can implement the rest of the system server side and just display pages inside the windows you have created.

Oren Hizkiya
  • 4,420
  • 2
  • 23
  • 33
0

The first link needs to display a different web page on the 2nd monitor, and the 2nd link needs to display a different web page on the 3rd monitor.

While, depending on your operating system, it is possible to control where a window appears, there are much fewer options for doing this using javascript / serverside code over HTTP / browsers.

The only sensible way to achieve this is by configuring the displays to be tiles of a larger display rather than independent screens (for *nix/BSD/Linux, check out xinerama).

The code below saves the size of a window - and would only need some simple changes to support x/y offset and multiple windows - I leave it to you as to how you differentiate between the windows.

A simpler approach would be to just have one huge window with frames whose borders align with the monitors.

if (document.getElementById && !document.all) { // NOT for MSIE
    stickySizeOverloadOnload(stickySizeSetWindowSize);
    stickySizeOverloadOnresize(stickySizeSaveWindowSize);
}

function stickySizeSaveWindowSize(event)
{
    var expiry = new Date();
    var path = document.location.pathname;

    expiry.setDate(expiry.getDate()+500);
    stickySizeSetCookie('windowSize', window.outerWidth + ',' + window.outerHeight, expiry, path);
}

function stickySizeSetWindowSize()
{
    var saved=stickySizeGetCookie('windowSize');
    var parts=new Array();
    if (saved.length) {
    parts = saved.split(',');
    if ((parts[0]>100) && (parts[1]>100)) {
        window.outerWidth=parts[0];
        window.outerHeight=parts[1];
    } else {
        alert("invalid size - '" + saved + "'");
        stickySizeDeleteCookie('windowSize');
    }
}
}

function stickySizeOverloadOnload(func)
{
   var oldhandler=window.onload;
   if (typeof window.onload != "function") {
      window.onload=func;
   } else {
     window.onload=function(event) {
       oldhandler(event);
   func(event);
     }
   }
}
function stickySizeOverloadOnresize(func)
{
   var oldhandler=window.onresize;
   if (typeof window.onresize != "function") {
      window.onresize=func;
   } else {
      window.onresize=function(event) {
         oldhandler(event);
         func(event);
      }
   }
}

function stickySizeSetCookie(name, value, expires, path, domain, secure) {
  var curCookie = name + "=" + escape(value) +
  ((expires) ? "; expires=" + expires.toGMTString() : "") +
  ((path) ? "; path=" + path : "") +
  ((domain) ? "; domain=" + domain : "") +
  ((secure) ? "; secure" : "");
  document.cookie = curCookie;
}
function stickySizeGetCookie(name) {
   var dc = document.cookie;
   var prefix = name + "=";
   var begin = dc.indexOf("; " + prefix);
   if (begin == -1) {
      begin = dc.indexOf(prefix);
      if (begin != 0) return null;
   } else
      begin += 2;
   var end = document.cookie.indexOf(";", begin);
   if (end == -1)
   end = dc.length;
   return unescape(dc.substring(begin + prefix.length, end));
}
function stickySizeDeleteCookie(name, path, domain) {
   if (stickySizeGetCookie(name)) {
      document.cookie = name + "=" +
        ((path) ? "; path=" + path : "") +
        ((domain) ? "; domain=" + domain : "") +
        "; expires=Thu, 01-Jan-70 00:00:01 GMT";
   }
}
symcbean
  • 47,736
  • 6
  • 59
  • 94
  • Hi symcbean, thanks for your reply. Unfortunately I'm not very good with javascript so ideally I need a 'plugin' solution. Sorry to be cheeky, but would you be able to help me out with the simple changes please? – Daniel H Apr 07 '11 at 09:12
  • Also, 3 will look to have 3 monitors all the same model, and the resolution probably at 1600 x 900, so if we can make the code work around that that would be great – Daniel H Apr 07 '11 at 09:13