473,324 Members | 2,456 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Dynamically showing and hiding browser supplied scrollbars

jvb
I hope this is the correct place to ask this question. If not, would some
kind person tell me where I should? In IE, one can use the javascript code,
"document.body.scroll='yes/no'" to dynamically control the visibility of a
window's scrollbars. Is there an equivalent for W3C browsers (in my case
firefox 1.0.6) that does not require messing with browser security?

Thanks in advance,

Jeff
----
Nov 11 '05 #1
5 4945
On Fri, 11 Nov 2005 13:47:51 -0700, jvb wrote:
I hope this is the correct place to ask this question. If not, would some
kind person tell me where I should? In IE, one can use the javascript code,
"document.body.scroll='yes/no'" to dynamically control the visibility of a
window's scrollbars. Is there an equivalent for W3C browsers (in my case
firefox 1.0.6) that does not require messing with browser security?


Not that I'm aware of. Besides, why would a browser that went to the effort
of implementing the standards correctly then do something foolish like
allow pages to turn off the scrollbars, which are part of the browser's
interface and not part of the page?

--
Safalra (Stephen Morley)
http://www.safalra.com/hypertext/
Nov 11 '05 #2
Once upon a time *jvb* wrote:
I hope this is the correct place to ask this question. If not, would some
kind person tell me where I should? In IE, one can use the javascript code,
"document.body.scroll='yes/no'" to dynamically control the visibility of a
window's scrollbars. Is there an equivalent for W3C browsers (in my case
firefox 1.0.6) that does not require messing with browser security?

Thanks in advance,


Don't fuss with your visitors browsers! You can do whatever you like
with your own browser, your visitors browsers is theirs, not yours and
the browser is not a part of your site!

--
/Arne
-- *Joke of the day* ----------------------------------------
Tech Support: How may I help you?
Customer: I'm writing my first e-mail.
Tech Support: OK, and what seems to be the problem?
Customer: Well, I have the letter 'a' in the address, but how do I get
the circle around it?
-------------------------------------------------------------
Nov 11 '05 #3
jvb a écrit :
I hope this is the correct place to ask this question. If not, would some
kind person tell me where I should? In IE, one can use the javascript code,
"document.body.scroll='yes/no'" to dynamically control the visibility of a
window's scrollbars.
Yes but is that a good idea? If scrollbar(s) appear, it is because there
is content which is not in the viewport but which can nevertheless be
reached. So, how would removing scrollbar(s) promote accessibility to
content? Removing scrollbars in such circumstances would go against the
objective interests of both the web author and user/visitor.

Is there an equivalent for W3C browsers (in my case firefox 1.0.6) that does not require messing with browser security?

There is a simple way to remove scrollbar(s) in all/any circumstances.
Just make sure that the document box will fit into the window viewport.
If you can not make sure of this, then you have to trust the normal,
standard browser functionality to allow the user to reach/access clipped
content.

"When the viewport is smaller than the document's initial containing
block, the user agent should offer a scrolling mechanism."
http://www.w3.org/TR/CSS2/visuren.html#q2
http://www.w3.org/TR/CSS21/visuren.html#q2

Why would you want to counter this standard, normal mechanism in browsers?

Gérard
--
remove blah to email me
Nov 23 '05 #4
On Fri, 11 Nov 2005, jvb wrote:
[...] to dynamically control the visibility of a window's
scrollbars. Is there an equivalent for W3C browsers (in my case
firefox 1.0.6) that does not require messing with browser security?


If you find a way to do that, let's hear about it[1]. The scrollbars
are part of *my* browser: if *you* can interfere with them without
setting off security alarms, then something is wrong with the browser.

thanks.

[1] so that we can report it as a bug, and/or find a way to defend
against it.
Nov 23 '05 #5
He did not ask could/should. He asked how and there are perfectly acceptable reasons for doing so. It can also be done on *his* site only. In W3C compliant browsers set the overflow:hidden style property in css on the BODY of the page.

Hope that helps.
Feb 9 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
by: Code Monkee | last post by:
How can the toolbar and menubar be hidden in IE? When opening the window via javascript I can specify 'toolbar=no,menubar=no', which works fine. However if the window already exists how can I...
8
by: lawrence | last post by:
Under the domain publicpen.com I've several dozen sites in subdiretories, such as www.publicpen.com/honenbeger. I've no trouble with any of these sites. But under one, which I put in yesterday,...
0
by: msnews.microsoft.com | last post by:
Hello, I am trying to remove the scrollbars from any page I load up into the browser control on a window form. I first tried the following: browserDoc = (mshtml.HTMLDocument)browser.Document;...
0
by: Kenneth H. Brannigan | last post by:
Hello, I am trying to remove the scrollbars from any page I load up into the browser control on a window form. I first tried the following: browserDoc = (mshtml.HTMLDocument)browser.Document;...
1
by: Amber | last post by:
The DataGrid allows you to make columns visible or invisible on demand - even edit and other special columns. This article will show you how it is done. Some developers have reported problems...
6
by: Steve Booth | last post by:
I have a web form with a button and a placeholder, the button adds a user control to the placeholder (and removes any existing controls). The user control contains a single button. I have done all...
11
by: GaryB | last post by:
Hi Guys, I've been battling with this one for hours - I hope that you can help me! My code modifies the <aon a page, from a standard document link into a link with a tailored onclick event. ...
9
by: dd | last post by:
Does anyone have a cross-browser solution for hiding scrollbars and/or disabling scroll for the whole page? When the user clicks something, I want to display a DIV that fills the whole client...
5
by: brwniydgirl | last post by:
Hi, I have a website that is CSS based, with the main content portion in a div with scrollbars and I've tested it in IE7 as well as Firefox and it appears to work fine on my computer and other...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.