knut: window.open an dynam. Koordinaten

Hallo Forum,

ich baue eine Site in der sich per JS ein neues
Window an einer bestimmten Stelle , die zur Gestaltung passt, öffnen soll.
Momentan sieht der code so aus:

Browser check und dann:

var ad ;

function openwn(x) {
ad = window.open(x + ".htm","adress","toolbar=no,location=no,status=no,menubar=no,width=270,height=270");
mov();
}

function mov()   {

if (NS4 IE4)
    {  
    ad.moveTo(screen.width-400,screen.height-400);
    ad.focus();
    }
}

Logischerweise öffnet sich das window erst, und dann bewegt es sich , was aber nich so dolle aussieht.Kennt jemand ein script, der das umgeht ?

danke für die antworten!

Knut

  1. Hallo Knut,

    so muß es funktionieren - für NC + MSIE

    var ad ;
    var w = screen.width-400;
    var h = screen.height - 400;
    var winopts = "toolbar=no,location=no,status=no,menubar=no,width=270,height=270,screenX="+w+",screenY="+h+",left="+w+",top="+h;

    function openwn(x) {
    ad = window.open(x + ".htm","adress",winopts);
    }

    Viele Grüße Günter

    1. Hallo Knut,

      so muß es funktionieren - für NC + MSIE

      »»  var ad ;
      »»  var w = screen.width-400;
      »»  var h = screen.height - 400;

      var winopts = "toolbar=no,location=no,status=no,menubar=no,width=270,height=270,screenX="+w+",screenY="+h+",left="+w+",top="+h;

      »»  function openwn(x) {
      »»  ad = window.open(x + ".htm","adress",winopts);

      }

      Viele Grüße Günter

      Hi Günter,

      eisbär is best !
      Danke für den script und wieder mal dazu gelernt.
      Bis zum naechsten mal.

      Knut