Connecting Tech Pros Worldwide Forums | Help | Site Map

Dynamically showing and hiding browser supplied scrollbars

jvb
Guest
 
Posts: n/a
#1: Nov 11 '05
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
----



Safalra
Guest
 
Posts: n/a
#2: Nov 11 '05

re: Dynamically showing and hiding browser supplied scrollbars


On Fri, 11 Nov 2005 13:47:51 -0700, jvb wrote:[color=blue]
> 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?[/color]

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/
Arne
Guest
 
Posts: n/a
#3: Nov 11 '05

re: Dynamically showing and hiding browser supplied scrollbars


Once upon a time *jvb* wrote:
[color=blue]
> 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,
>[/color]

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?
-------------------------------------------------------------
Gérard Talbot
Guest
 
Posts: n/a
#4: Nov 23 '05

re: Dynamically showing and hiding browser supplied scrollbars


jvb a écrit :[color=blue]
> 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.[/color]

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[color=blue]
> firefox 1.0.6) that does not require messing with browser security?[/color]


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
Alan J. Flavell
Guest
 
Posts: n/a
#5: Nov 23 '05

re: Dynamically showing and hiding browser supplied scrollbars


On Fri, 11 Nov 2005, jvb wrote:
[color=blue]
> [...] 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?[/color]

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.
Newbie
 
Join Date: Feb 2006
Posts: 1
#6: Feb 9 '06

re: Dynamically showing and hiding browser supplied scrollbars


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.
Closed Thread