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!
-->
|