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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

remove scrollbar on homepage 4

Status
Not open for further replies.

EchoAlertcom

IS-IT--Management
Oct 8, 2002
239
0
0
US
Hello,

I need to remove the scrollbars on the default homepage that loads. I know how to do it with a hyperlink opening a new window.

I need this to work in all browsers.

I assume something OnLoad=&quot;something&quot; needs to go into the <body> tag but I need help.

I am javascript illiterate so please be complete in your response.

Sincerely,
Steve
 
Just a style attribute will work for all browsers :
Code:
<Body style=&quot;overflow:hidden&quot;>

Beware, that style attribute will hide every scroll bar every time on the page but if you resize your browser window or if you lower your screen res, some of the page will be hidden without possibility for you to bring it back on your screen. Water is not bad as long as it stays out human body ;-)
 
Targol,

I tried your solution and it works great in IE but nt NetScape 4.08 which is the latest I have. I am going to download a newer version to test that. But we do have people visiting the site with older Netscape browsers so I would still like to find out how we can get it to work.

Do you have any suggestions?

Thanks for your help.

Steve Funk
 
I think this is going to be difficult to try to hide scrollbars with script within a browser that doesn't even know CSS basics. I think I reached my level of incompetence here !!! Water is not bad as long as it stays out human body ;-)
 
Echo-
As much as I hate to say it, there cannot possibly be that many users visiting your site with netscape older than about version 4 can there?

If so, I would have an alert that shows when someone has a browser that is not up-to date enough and then a redirect to the download page. Netscape has a download manager for those people that will be downloading the program through dial-up, which allows them to download the file in as small or as large amounts of time as they want.


One Company makes a mistake and we'll be dealing with its reprocussions for our entire lives.
&quot;Why is it always the quiet ones?&quot;

Robert Carpenter
questions? comments? thanks? email me!
linkemapx@hotmail.com
AIM & MSN: robacarp
 
This sounds like a good plan. Thank you both for your help.

So I can relay this to the right person. Could you list the browsers and versions that understand CSS basics? I looked but couldn't find one. This way I can let them know so they don't get surprised.

Sincerely,
Steve Funk
 
IE and Netscape are the most used browsers. For IE, 4+ has good CSS support. For Netscape, 6+ has good CSS support. The latest version of Opera has good support from what I can tell, and I think the version before that did as well. I haven't tested them, but the latest versions of Mozilla should have good support as well.

As far as a long list, that would take a good deal of searching through the countless number of web browsers that are available. Only a small percentage of people do not use one of the 4 listed above. Out of that small percentage of people, I would say most of them use text based browsers; in which case CSS support really doesn't matter. --
Jonathan
 
Here is a chart that refrences most browsers that support css and how they handle it. It should let you know what versions of what browsers will do what you want.

&quot;Why is it always the quiet ones?&quot;

Robert Carpenter
questions? comments? thanks? email me!
linkemapx@hotmail.com
AIM & MSN: robacarp
 
As a follow up.

What would be the java routine to turn on/off the 'no scrollbars' routine so that when a user with higher resolution, say, than 800, would be given the &quot;no scroll bar&quot; event, and those with higher resolution are set to have no scrollbars?
 
jeff provided a solution:

window.onload = function() {
if (screen.width < 800)
document.body.style.overflow = &quot;hidden&quot;;
}
 
you should also be able to do this in your body tag, although I dont know if it is xhtml compliant or not.

<body scroll=&quot;auto&quot;>

that woudl make the screen display the scrollbars only when it needs to.

Robert Carpenter
--------------------
&quot;Isn't it funny how you are perfectly content with being alone until nobody else is?&quot;
--------------------
robert@convertingchaos.com
convertingchaos.com
 
I've used <body scroll=&quot;no&quot;> with no problems.

Adam
while(ignorance==true){perpetuate(violence,fear,hatred);life=life-1};
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top