Ursäkta en glad pensionär som gått med här! Men när jag skriver taggen att starta det här scriptet funkar det inte.
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Ny sida 1</title>
<SCRIPT language=JavaScript type=text/JavaScript>
//open popup that contains site
function openSite() {
//get screen dimensions
if (self.screen) {
sw = self.screen.width;
sh = self.screen.height;
} else return;
//set props
w=450;
h=500;
url='site.php';
title = 'Bukwild';
winProperties = 'height='+h+',width='+w+',toolbar=no,location=no,scrollbars=no,titlebar=no,menubar=no,resizable=no,status=no';
//open and move
win = window.open(url,title, winProperties);
win.moveTo((sw-w)/2,(sh-h)/2);
}
//center window
function moveSplash() {
/\*
NOTES
Disabled because button bar not counted and would shift the screen too low
\*/
//get window dimensions
if (self.outerWidth) {
dw = self.innerWidth;
dh = self.innerHeight;
} else if (document.documentElement && document.documentElement.clientWidth) {
dw = document.documentElement.clientWidth;
dh = document.documentElement.clientHeight;
} else if (document.body) {
dw = document.body.clientWidth;
dh = document.body.clientHeight;
} else return;
//get screen dimensions
if (self.screen) {
sw = self.screen.width;
sh = self.screen.height;
} else return;
//move
x = (sw-dw)/2;
y = (sh-dh)/4; //4 compensates for lame window dimensions getting
parent.window.moveTo(x,y);
}
</SCRIPT>
</head>
<body>
<a href="#" onclick="openSite()">Öppna
</body>
</html>