Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Probleme with my script : Noscroll bar with I.Explorer

Status
Not open for further replies.

Laurelhach

Technical User
Jan 18, 2001
1
CA
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 = &quot;JavaScript&quot;>

////////// 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=&quot;0&quot; border=&quot;0&quot; cols=&quot;138,*&quot; frameborder=&quot;0&quot;><frame name=&quot;left&quot; scrolling=&quot;no&quot; noresize target=&quot;rtop&quot; src=&quot;telecommande.htm&quot;><frameset rows=&quot;95%,*&quot;><frame src=&quot;'+window.location+'?&quot; name=&quot;rtop&quot; target=&quot;_self&quot; scrolling=&quot;auto&quot; noresize><frame name=&quot;rbottom&quot; scrolling=&quot;no&quot; noresize src=&quot;bas.htm&quot; target=&quot;bas&quot;></frameset>';
document.write(s);
}

////////// SECOND PART /////////

if (navigator.appName == 'Microsoft Internet Explorer') {

if ((screen.width == 640) &amp;&amp; (screen.height == 480)) {
location.href = 'attention.htm';

} else if((screen.width == 800) &amp;&amp; (screen.height == 600)) {
moveTo(0,0);
window.resizeTo(screen.width,screen.height);

} else if ((screen.width == 1024) &amp;&amp; (screen.height == 768)) {
window.resizeTo(800,570);

} else {
window.resizeTo(800,570);

}
}

else if (navigator.appName == 'Netscape') {

if ((screen.width == 640) &amp;&amp; (screen.height == 480)) {
location.href = 'attention.htm';

} else if((screen.width == 800) &amp;&amp; (screen.height == 600)) {
moveTo(0,0);
window.resizeTo(screen.width,screen.height);

} else if ((screen.width == 1024) &amp;&amp; (screen.height == 768)) {
window.resizeTo(800,480);

} else {
location.href = 'attention.htm';

}
}

else if (navigator.appName == '*')
location.href = 'attention.htm';

//-->

</SCRIPT>


 
could this be why:


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=&quot;0&quot; border=&quot;0&quot; cols=&quot;138,*&quot; frameborder=&quot;0&quot;><frame name=&quot;left&quot; scrolling=&quot;no&quot; noresize target=&quot;rtop&quot; src=&quot;telecommande.htm&quot;><frameset rows=&quot;95%,*&quot;><frame src=&quot;'+window.location+'?&quot; name=&quot;rtop&quot; target=&quot;_self&quot; scrolling=&quot;auto&quot; noresize><frame name=&quot;rbottom&quot; scrolling=&quot;no&quot; noresize src=&quot;bas.htm&quot; target=&quot;bas&quot;></frameset>';
document.write(s);

sorry if this does not help, but I guess I am not so sure what you want. theEclipse
eclipse_web@hotmail.com
**\\||It was recently discovered that research causes cancer in rats||//**
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top