URL: https://www.overclockers.at/applications/aufloesung_fuer_webseite_1099/page_1 - zur Vollversion wechseln!
Ich versuch grad (wenn mans genau nimmt seit einer Stunde) auf meiner Homepage die Auflösung anzupassen, so daß es für jede Auiflösung eine eigene Seite gibt.
Und zwar So:
ScreenRes = screen.width;
if(ScreenRes == "1280") res = "r1";
else if (ScreenRes == "1024") res = "r2";
else if (ScreenRes == "800") res = "r3";
else if (ScreenRes == "640") res = "r4";
if (res == "r1") {
location.href="1280.html";
}
if (res == "r2") {
location.href="1024.html";
}
if (res == "r3") {
location.href="800.html";
}
if (res == "r4") {
location.href="640.html";
}
Das Teil schickt mich aber nicht zu der Seite die ich will sondern ich sehe nur eine weiße Seite, keine Fehlermeldung kein gar nichts http://www.overclockers.at/ubb/frown.gif
Hoffe irgendjemand kennt sich damit aus
versuchs mal so:
innerhalb des script tags:
function redirectPage() {
var url640x480 = "640x480.html";
var url800x600 = "800x600.html";
var url1024x768 ="1024x768.html";
if ((screen.width == 640) && (screen.height == 480))
window.location.href= url640x480;
else if ((screen.width == 800) && (screen.height == 600))
window.location.href= url800x600;
else if ((screen.width == 1024) && (screen.height == 768))
window.location.href= url1024x768;
else window.location.href= url640x480;
}
und im body tag:
onLoad="redirectPage()"
aba ich wuerd die seite einfach fuer 800*600 schreiben ...
Ich schreib sie Sowiso nur für 800x600 und 1024x768, aba beim Netscape macht das Navigationsmenü Probleme (komisch, auch nur manchmal) bei 640x480 is dann alles wieder in Ordnung.
Aber Danke, ich werds gleich mal ausprobieren.
overclockers.at v4.thecommunity
© all rights reserved by overclockers.at 2000-2025