vindue centrer
Nyt problem....Jeg har denne kode som virker fint nok, men når den åbner index 3,5 & 7 så rykker den vinduet lidt ud og lidt ned...kan man ikke centrere det på en eller anden måde så det kommer lige midt i....
1 stk. kode:
og på forhånd tak :)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
<html>
<head>
<SCRIPT LANGUAGE="JavaScript">
browserName = navigator.appName;
browserVer = parseInt(navigator.appVersion);
if (browserName == "Netscape" && browserVer >= 5)
version = "1";
else if (browserName == "Netscape" && browserVer >= 4)
version = "2";
else if (browserName == "Microsoft Internet Explorer" && browserVer >= 4)
version = "3";
else
version ="4";
if (version == "1") {
var correctwidth=1024
var correctheight=768
if (screen.width<correctwidth||screen.height<correctheight)
window.open('index2.html', '', 'toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizeale=no,width=790,height=600');
else
window.open('index3.html', '', 'toolbar=yes,location=yes,status=yes,menubar=yes,scrollbar=yes,width=1019,height=608');
}
if (version == "2") {
var correctwidth=1024
var correctheight=768
if (screen.width<correctwidth||screen.height<correctheight)
window.open('index4.html', '', 'toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizeale=no,width=790,height=600');
else
window.open('index5.html', '', 'toolbar=yes,location=yes,status=yes,menubar=yes,scrollbar=yes,width=1019,height=608');
}
if (version == "3") {
var correctwidth=1024
var correctheight=768
if (screen.width<correctwidth||screen.height<correctheight)
window.open('index6.html', '', 'toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizeale=no,width=790,height=600');
else
window.open('index7.html', '', 'toolbar=yes,location=yes,status=yes,menubar=yes,scrollbar=yes,width=1019,height=608');
}
if (version == "4")
location="default_page"
</SCRIPT>
</head>
</html>
