Laurelhach
Technical User
Hi,
I have a problem with my script, here's my problem :
I want to have the scroll bar on my pages, the script below redirect the browser depending the navigator and the screen resolution and it check if the frames are correct, if not the script turn back to the frames.
But if i use only one of the both part of my script, the scroll bar appear on my web site.
Anyone know how i can keep my scripts and have my scroll bar ?
PS : The script is working fine on Netscape but not Explorer ...
THE SCRIPT :
<SCRIPT LANGUAGE = "JavaScript">
////////// FIRST PART /////////
<!----
if(window == window.top)
{
var s='<TITLE>Les Terres du Milieu - Jeu de Rôle inspiré de l Oeuvre de J.R.R.Tolkien - Bienvenue - Welcome</TITLE><frameset framespacing="0" border="0" cols="138,*" frameborder="0"><frame name="left" scrolling="no" noresize target="rtop" src="telecommande.htm"><frameset rows="95%,*"><frame src="'+window.location+'?" name="rtop" target="_self" scrolling="auto" noresize><frame name="rbottom" scrolling="no" noresize src="bas.htm" target="bas"></frameset>';
document.write(s);
}
////////// SECOND PART /////////
if (navigator.appName == 'Microsoft Internet Explorer') {
if ((screen.width == 640) && (screen.height == 480)) {
location.href = 'attention.htm';
} else if((screen.width == 800) && (screen.height == 600)) {
moveTo(0,0);
window.resizeTo(screen.width,screen.height);
} else if ((screen.width == 1024) && (screen.height == 768)) {
window.resizeTo(800,570);
} else {
window.resizeTo(800,570);
}
}
else if (navigator.appName == 'Netscape') {
if ((screen.width == 640) && (screen.height == 480)) {
location.href = 'attention.htm';
} else if((screen.width == 800) && (screen.height == 600)) {
moveTo(0,0);
window.resizeTo(screen.width,screen.height);
} else if ((screen.width == 1024) && (screen.height == 768)) {
window.resizeTo(800,480);
} else {
location.href = 'attention.htm';
}
}
else if (navigator.appName == '*')
location.href = 'attention.htm';
//-->
</SCRIPT>
I have a problem with my script, here's my problem :
I want to have the scroll bar on my pages, the script below redirect the browser depending the navigator and the screen resolution and it check if the frames are correct, if not the script turn back to the frames.
But if i use only one of the both part of my script, the scroll bar appear on my web site.
Anyone know how i can keep my scripts and have my scroll bar ?
PS : The script is working fine on Netscape but not Explorer ...
THE SCRIPT :
<SCRIPT LANGUAGE = "JavaScript">
////////// FIRST PART /////////
<!----
if(window == window.top)
{
var s='<TITLE>Les Terres du Milieu - Jeu de Rôle inspiré de l Oeuvre de J.R.R.Tolkien - Bienvenue - Welcome</TITLE><frameset framespacing="0" border="0" cols="138,*" frameborder="0"><frame name="left" scrolling="no" noresize target="rtop" src="telecommande.htm"><frameset rows="95%,*"><frame src="'+window.location+'?" name="rtop" target="_self" scrolling="auto" noresize><frame name="rbottom" scrolling="no" noresize src="bas.htm" target="bas"></frameset>';
document.write(s);
}
////////// SECOND PART /////////
if (navigator.appName == 'Microsoft Internet Explorer') {
if ((screen.width == 640) && (screen.height == 480)) {
location.href = 'attention.htm';
} else if((screen.width == 800) && (screen.height == 600)) {
moveTo(0,0);
window.resizeTo(screen.width,screen.height);
} else if ((screen.width == 1024) && (screen.height == 768)) {
window.resizeTo(800,570);
} else {
window.resizeTo(800,570);
}
}
else if (navigator.appName == 'Netscape') {
if ((screen.width == 640) && (screen.height == 480)) {
location.href = 'attention.htm';
} else if((screen.width == 800) && (screen.height == 600)) {
moveTo(0,0);
window.resizeTo(screen.width,screen.height);
} else if ((screen.width == 1024) && (screen.height == 768)) {
window.resizeTo(800,480);
} else {
location.href = 'attention.htm';
}
}
else if (navigator.appName == '*')
location.href = 'attention.htm';
//-->
</SCRIPT>