472,794 Members | 1,930 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

how to hide scrollbars in netscape?

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
6 11408
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
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
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
"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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Thomas Abraham | last post by:
Hi, The following code to show and hide a row works fine in netscape 7 and IE 6. But everytime the cell is hidden and displayed in netscape, it adds a new line inside the cell. Please advise....
8
by: adrien | last post by:
Thanks for all the answers about how to hide scrollbars in netscape. The conclusion is that it's not possible. My initial purpose is to compare some Netscape and IE possibilities and it's the...
5
by: Dennis M. Marks | last post by:
My script opens a window that is supposed to be resizable and scrollable. I am on a Mac. With IE 5.1.7 it works fine. With Netscape 6 there is no scroll bar. I am able to resize it smaller than the...
1
by: leiko | last post by:
how can I get a vertical scrollbar in Netscape Navigator when I open a new window ? window.open('newpage', 'pagename','width=420,height=320, scrollbars=yes status=no') seems to work only with IE.
1
by: Markus Ernst | last post by:
Hi I have a page with CSS. The CSS validates at the W3C validator, and the page works ok in Netscape 7 on Mac and PC and also on IE 6 on PC. But on Internet Explorer 5.0 / Mac OS 9.2 the...
19
by: dmiller23462 | last post by:
Hi guys....I have absolutely NO IDEA what I'm doing with Javascript but my end result is I need two text boxes to stay hidden until a particular option is selected....I've cobbled together the...
5
by: vunet.us | last post by:
How can I hide scrollbars which appear in my floating div element with CSS property overflow:auto? I do need to use auto overflow. Thank you.
11
by: dusk | last post by:
Hi, I'm very new to javascript, and I'm having trouble finding a way to display a string of divs without the code getting really messy. I have several different pages to write, each with about...
2
by: dusk | last post by:
Hi, I have a page with lots of hidden divs which are revealed based on choices made at each 'layer'. So I've used naming convention which represents the order in which each div becomes...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: lllomh | last post by:
How does React native implement an English player?
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

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.