scriptwelt.org das JavaScript Archiv

Navigation
Startseite
Audio & Sound
Formulare
Cookies
Fenster & Frame
Grafik & Text
Navigation
Suche Scripts
Fun und Spiele
Buttons
Diverse
Tutorials

Kontakt
eine Mail an ScriptWelt.org
Webhosting
Tipps zur Providerwahl und zum Webspace

JavaScript in eine HTML Datei einbinden

Sind JavaScripts sicher?

Links zum Thema JavaSript

Impressum
impressum

Fenster & Frame JavaScript / zentriertes Pop-Up Fenster - Centered Pop-Up Window

Das JavaScript generiert ein zentriertes Pop-Up Fenster.
Autor: unbekannt
Demo Click Here

in <head> einfügen

<SCRIPT LANGUAGE="JavaScript">

<!-- Die JavaScript Sammlung! http://www.scriptwelt.org -->

<!-- Begin
var win = null;
function newWindow(mypage,myname,w,h,features) {
var winl = (screen.width-w)/2;
var wint = (screen.height-h)/2;
if (winl < 0) winl = 0;
if (wint < 0) wint = 0;
var settings = 'height=' + h + ',';
settings += 'width=' + w + ',';
settings += 'top=' + wint + ',';
settings += 'left=' + winl + ',';
settings += features;
win = window.open(mypage,myname,settings);
win.window.focus();
}
// End -->
</script>


in <body> einfügen

<a href="#null" onClick="newWindow('http://javascript.internet.com/','','650','250','resizable,scrollbars,status,toolbar')">Click Here</a>

<!--
Informational purposes only -
// Variables:

// 750 - width
// 450 - height
// resizable - window can be resized
// scrollbars - window displays the scrollbar on the right
// status - window displays the status bar at the bottom
// toolbar - window displays the toolbar at the top

// Note: href="#null" makes the link display as a link. Don't leave it out!
-->