tommy: Zentrieren von Popups...

Beitrag lesen

Hallo Rolf!

Gibt es eine Möglichkeit für Netscape und Opera die Popups im Browserfenster zu zentrieren?

Ja, die gibt es!

function oeffneFenster ( myURL, myName, myWidth, myHeight, otherOptions )
    {
      myCenterX = ( screen.width  / 2 ) - ( myWidth / 2 ) ;
      myX       = ( "screenX=" + myCenterX );
      myCenterY = ( screen.height / 2 ) - ( myHeight / 2 );
      myY       = ( "screenY=" + myCenterY );
      myWidth  = ( "width=" + myWidth );
      myHeight = ( "height=" + myHeight );
      myOptions = ( myWidth + "," + myHeight + "," + myX + "," + myY );
      if (otherOptions) { myOptions = ( myOptions + "," + otherOptions ); }
      Fenster = window.open( myURL, myName, myOptions );
      if (navigator.appName != "Netscape")
      { Fenster.moveTo (myCenterX,myCenterY); }
}

...Sollte helfen...

Gruß tommy