Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

neues fenster in fester größe ohne ...

Empfohlene Antworten

Hallo,

ich verstehe so gut wie ganz gar nichts von javascript, only html und möchte aber das sich über ein link ein fenster öffnet in fester größe, ohne toolbar, adressleiste etc. mittig auf den bildschirm ausgrichtet.

welchen befehlssatz benötige ich dazu???

hab dank!

<script language="JavaScript1.5" type="text/javascript">
var fenster;

function neues()
{
fenster = window.open (
"",
"NeuesFenster", // Name des neuen Fensters
+"toolbar=0" // Toolbar
+",location=0" // Adress-Leiste
+",directories=0" // Zusatzleisten
+",status=0" // Statusleiste
+",menubar=0" // Menü
+",scrollbars=0" // Scrollbars
+",resizable=0" // Fenstergrösse veränderbar?
+",width=300" // Fensterbreite in Pixeln
+",height=400" // Fensterhöhe in Pixeln
);

fenster.moveTo(
200, // X-Koordinate
200 // Y-Koordinate
); // der linken oberen Ecke

fenster.location.href = "http://www.domian.de";
//Dateiname und Pfad der Datei, die angezeigt werden soll
}
</script>

</head> <body> <a href="javascript:neues();">Neues Fenster öffnen!</a> [/PHP]

Die X und Y - Koordinaten kannst Du nach deinen Vorstellungen anpassen. Das Script kommt in den <head></head> Bereich und der Link natürlich in den <body></body>.

Zum Zentrieren eines Fensters habe ich mir mal folgende Funktion geschrieben, die du in obigem Beispiel statt des "moveTo()" aufrufen kannst:

   function centerWindow (fenster, width, height) {

      var leftPos = screen.width?(screen.width - width)/2:0;

      var topPos = screen.height?(screen.height - height)/2:0;

      fenster.moveTo(leftPos, topPos);

   }

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.