By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,215 Members | 1,930 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,215 IT Pros & Developers. It's quick & easy.

how to hide scrollbars in netscape?

P: n/a
Hi,

(also posted in netscape.public.mozilla.browser)
i use netscape 7 and want to hide the scrollbars of the window when
something happens. I tried this:
window.scrollbars.visible=false
window.scrollbars.visibility="no"
....
nothing works
Is it also possible only to hide the vertical scrollbar instead of both?

thanks for any clue
Jul 20 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
adrien wrote:
Hi,

(also posted in netscape.public.mozilla.browser)
i use netscape 7 and want to hide the scrollbars of the window when
something happens. I tried this:
window.scrollbars.visible=false
window.scrollbars.visibility="no"
...
nothing works
Is it also possible only to hide the vertical scrollbar instead of both?

thanks for any clue


Well, you could continue to guess, or you could read the documentation:

<url: http://www.mozilla.org/docs/dom/domr...4.html#1020687
/>

Pay particular attention to the "Notes" section.

--
| Grant Wagner <gw*****@agricoreunited.com>

* Client-side Javascript and Netscape 4 DOM Reference available at:
*
http://devedge.netscape.com/library/...ce/frames.html

* Internet Explorer DOM Reference available at:
*
http://msdn.microsoft.com/workshop/a...ence_entry.asp

* Netscape 6/7 DOM Reference available at:
* http://www.mozilla.org/docs/dom/domref/
* Tips for upgrading JavaScript for Netscape 6/7 and Mozilla
* http://www.mozilla.org/docs/web-deve...upgrade_2.html
Jul 20 '05 #2

P: n/a
adrien wrote:
(also posted in netscape.public.mozilla.browser)
http://www.cs.tut.fi/~jkorpela/usenet/xpost.html
i use netscape 7 and want to hide the scrollbars of the window when
something happens. I tried this:
window.scrollbars.visible=false
window.scrollbars.visibility="no"
html,body { overflow: hidden; } in the style sheet.

But what if the content won't fit in the window?
Is it also possible only to hide the vertical scrollbar instead of both?


No

--
David Dorward http://david.us-lot.org/
Jul 20 '05 #3

P: n/a
The purpose with the scrollbars is for me to learn making dynamic webpages
with javascript with Netscape, not for publishing. When i try something, i
try until it works ..or until i realise it's impossible.
What i aimed here is to make the scrollbars hidden when the mouse tries to
reach the vertical scrollbar. With all the received info, look at this code,
please:
<BODY id="bod">
<script language="JavaScript">
var usermouse;
var limit;
limit=document.body.clientWidth * 0.9;

function test(e) {
usermouse=e.screenX
sbar=document.getElementById("bod");
if (usermouse>=limit)
{
sbar.setAttribute("style" , "overflow:hidden;");
alert("you cannot reach the vertical scrollbar");
}
else
{
sbar.setAttribute("style" , "overflow:visible;");
}
document.onmousemove=test;
}
</script>
BUT it doesn't work. Only the Alert appears but the scrollbars are still
visible. Do i do something wrong (no error in javascript console) or ...?
Thanks anyway.
"DU" <dr*******@hotREMOVEmail.com> wrote in message
news:bf**********@news.eusc.inter.net...
adrien wrote:
Hi,

(also posted in netscape.public.mozilla.browser)
i use netscape 7 and want to hide the scrollbars of the window when
something happens. I tried this:
window.scrollbars.visible=false
window.scrollbars.visibility="no"
....
nothing works
Is it also possible only to hide the vertical scrollbar instead of both?

thanks for any clue
Why would you want to remove the scrollbars when the content overflows
the window dimensions? ... because this is why and when scrollbars

appear..
The user can override even a html, body {overflow:hidden;} css
declaration by editing an userContent.css and have html, body
{overflow:visible !important;} or {overflow:auto !important;}.

And the user.js file can take care of "scrollbars=no" in the
window.open() calls with
user_pref("dom.disable_window_open_feature.scrollb ars", true);

What you are asking to do is counter-accessibility and is anti-user.
Preventing to notice that overflowed content is clipped and preventing
to access, to reach via scrollbars such clipped content just can not be
in the objective interests of the web designer and in the objective
interests of the visitors/users/customers.

DU
--
Javascript and Browser bugs:
http://www10.brinkster.com/doctorunclear/

Jul 20 '05 #4

P: n/a
"adrien" <hg****@sdgs.fb> writes:
and i tried this too:

sbar.style = "overflow: hidden";

now i get the error: "setting a property that has only a getter"


It's
sbar.style.overflow="hidden";
/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #5

P: n/a
Your original function was assigning document.onmousemove=test; inside the
event handler, so it was never called. Here is a version that provides the
coordinates on the status bar (so you can see stuff happening) and that
provides the alerts you want. It does not, however, hide the scrollbars. As
has been pointed out a couple of times already, you can not remove the
scrollbars on an existing window in the default security environment. And
even with the proper security, Mozilla can be configured to defeat your
attempt to hide the scrollbars.

var limit = document.body.clientWidth * 0.9;

function test(e) {
var usermouse = e.screenX;
var sbar = document.getElementById("bod");
// watch the values to ensure this event handler is executing
window.status = usermouse + ":" + limit;
if (usermouse >= limit) {
sbar.style.overflow = "hidden";
alert("you cannot reach the vertical scrollbar");
} else {
sbar.style.overflow = "visible";
}
}
document.onmousemove = test;

adrien wrote:
thanks, that's right, i changed but ....

it still not working: i get the alert, no error anymore, but the bars are
sill visible ...

"Lasse Reichstein Nielsen" <lr*@hotpop.com> wrote in message
news:y8**********@hotpop.com...
"adrien" <hg****@sdgs.fb> writes:
and i tried this too:

sbar.style = "overflow: hidden";

now i get the error: "setting a property that has only a getter"


It's
sbar.style.overflow="hidden";
/L


--
| Grant Wagner <gw*****@agricoreunited.com>

* Client-side Javascript and Netscape 4 DOM Reference available at:
*
http://devedge.netscape.com/library/...ce/frames.html

* Internet Explorer DOM Reference available at:
*
http://msdn.microsoft.com/workshop/a...ence_entry.asp

* Netscape 6/7 DOM Reference available at:
* http://www.mozilla.org/docs/dom/domref/
* Tips for upgrading JavaScript for Netscape 6/7 and Mozilla
* http://www.mozilla.org/docs/web-deve...upgrade_2.html
Jul 20 '05 #6

P: n/a
DU wrote:
The challenge and question still remains: why would you want to remove
the scrollbars? A specific case still has not been explicited.


Lets say I'm writing a scrolling shoot 'em up for a browser. I could
just move the scrolling section by setting the top or left properties of
a containing element, but that would be very slow on older machines, so
a better way to do this would be using an IFRAME with the scrollbars
turned off.

Carl.

Jul 20 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.