09. marts 2002 - 16:17
Der er
2 kommentarer og
1 løsning
Nyt vindue........
Jeg er ved at lave en side hvor den sender brugeren til 2 forskellige sider afhængig af skærmopløsningen skriptet ser sådan ud:
<html>
<head>
<SCRIPT LANGUAGE="JavaScript">
browserName = navigator.appName;
browserVer = parseInt(navigator.appVersion);
if (browserName == "Netscape" && browserVer >= 4 || browserName ==
"Microsoft Internet Explorer" && browserVer >= 4)
version = "1";
else if (browserName == "Netscape" && browserVer >= 3)
version = "2";
else
version = "3";
if (version == "1") {
var correctwidth=1024
var correctheight=768
if (screen.width<correctwidth||screen.height<correctheight)
location="index2.html"
else
location="index3.html"
}
if (version == "2") {
var correctwidth=1024
var correctheight=768
if (screen.width<correctwidth||screen.height<correctheight)
location="index2.html"
else
location="index3.html"
}
if (version == "3")
location="DEFAULT_PAGE.html"
</SCRIPT>
</head>
</html>
Nu er det så jeg vil høre om man kan lave sådan så det ene af de vinduer den åbner f.eks. index2.html bliver åbnet uden menubar, statuslinje osv.... og det andet bliver åbnet uden ændringer???
På forhånd tak
zHA
09. marts 2002 - 16:26
#1
//uden noget:
window.open('index2.html', '', 'menubar=0,status=0,toolbar=0,location=0,directories=0');
//normal:
window.open('index3.html', '_blank', '');
09. marts 2002 - 16:40
#3
<html>
<head>
<SCRIPT LANGUAGE="JavaScript">
browserName = navigator.appName;
browserVer = parseInt(navigator.appVersion);
if (browserName == "Netscape" && browserVer >= 4 || browserName ==
"Microsoft Internet Explorer" && browserVer >= 4)
version = "1";
else if (browserName == "Netscape" && browserVer >= 3)
version = "2";
else
version = "3";
if (version == "1") {
var correctwidth=1024
var correctheight=768
if (screen.width<correctwidth||screen.height<correctheight)
window.open('index2.html', '', 'menubar=0,status=0,toolbar=0,location=0,directories=0');
else
window.open('index3.html', '_blank', '');
}
if (version == "2") {
var correctwidth=1024
var correctheight=768
if (screen.width<correctwidth||screen.height<correctheight)
window.open('index2.html', '', 'menubar=0,status=0,toolbar=0,location=0,directories=0');
else
window.open('index3.html', '_blank', '');
}
if (version == "3")
location="DEFAULT_PAGE.html"
</SCRIPT>
</head>
</html>