473,545 Members | 2,627 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Visible scrollbars

GTi
I have a popup window, If this window is to smaal the scrollbars is
visible.
Is there any JavaScript available so I can check if the scrollbars is
visible on page (right and bottom side)?
Then I can auto resize the window so it dosen't show (until a maximums
size).

Jan 2 '06 #1
10 2160

GTi napisal(a):
I have a popup window, If this window is to smaal the scrollbars is
visible.
Is there any JavaScript available so I can check if the scrollbars is
visible on page (right and bottom side)?
Then I can auto resize the window so it dosen't show (until a maximums
size).


Certainly others will provide some answer that does exactly what you
want (possibly based on scrollHeight, scrollTop etc) but for now my
answer was BODY {overflow: hidden;} in stylesheets.

Jan 2 '06 #2
bw****@gmail.co m wrote:
GTi napisal(a):
I have a popup window, If this window is to smaal the scrollbars is
visible.
Is there any JavaScript available so I can check if the scrollbars is
visible on page (right and bottom side)?
Then I can auto resize the window so it dosen't show (until a maximums
size).

Don't even attempt it. Users can maximise their windows with a single
keystroke or mouse click. If their windows are set to a certain size,
it's because they want them that way.

Certainly others will provide some answer that does exactly what you
want
Nah, most don't care for pop-ups at all. Scripts that try to resize
them are just a further annoyance and may well be prevented by user
preference settings anyway.

(possibly based on scrollHeight, scrollTop etc) but for now my
answer was BODY {overflow: hidden;} in stylesheets.


So users can't access the overflow - guess that serves them right for
having a smaller than expected window or monitor.
--
Rob
Jan 2 '06 #3
GTi wrote:
I have a popup window, If this window is to smaal the scrollbars is
visible.
Is there any JavaScript available so I can check if the scrollbars is
visible on page (right and bottom side)?
Then I can auto resize the window so it dosen't show (until a maximums
size).


You have not thought this through. Consider, for example that users have
a text zoom level that makes it impossible to display the window without
scrollbars on the current screen -- iff there is a (popup) window, and iff
there are scrollbars, provided by a graphical user interface.
PointedEars
Jan 2 '06 #4
GTi
RobG wrote:
bw****@gmail.co m wrote:
GTi napisal(a):
I have a popup window, If this window is to smaal the scrollbars is
visible.
Is there any JavaScript available so I can check if the scrollbars is
visible on page (right and bottom side)?
Then I can auto resize the window so it dosen't show (until a maximums
size).

Don't even attempt it. Users can maximise their windows with a single
keystroke or mouse click. If their windows are set to a certain size,
it's because they want them that way.

My Web Application use popup to fill in some information. Based on the
type of information the window size can vary (don't mention the content
of a combo box).
So instead of hardcode the size I want to leave it to JavaScript to
find the best size whitin maximum bounderies. This is only on popup and
when the page load.

Certainly others will provide some answer that does exactly what you
want
Nah, most don't care for pop-ups at all. Scripts that try to resize
them are just a further annoyance and may well be prevented by user
preference settings anyway.

I mostly agree - but only for public internet sites. For web
applications (mostly intranet) popup is is good thing for filling in
information or see properties for some items.

(possibly based on scrollHeight, scrollTop etc) but for now my
answer was BODY {overflow: hidden;} in stylesheets.
No - This is no option at all.

So users can't access the overflow - guess that serves them right for
having a smaller than expected window or monitor.
--
Rob


I gues you don't know of a script like this then...

Jan 2 '06 #5
GTi
Thomas 'PointedEars' Lahn wrote:
GTi wrote:
I have a popup window, If this window is to smaal the scrollbars is
visible.
Is there any JavaScript available so I can check if the scrollbars is
visible on page (right and bottom side)?
Then I can auto resize the window so it dosen't show (until a maximums
size).


You have not thought this through. Consider, for example that users have
a text zoom level that makes it impossible to display the window without
scrollbars on the current screen -- iff there is a (popup) window, and iff
there are scrollbars, provided by a graphical user interface.
PointedEars


To fill in some more information:
This is only for POPUP windows AND for WEB APPLICATIONS.
And the JavaScript is only used to find the best size of the POPUP
window WHITIN maximum bounderies AT startup only. And if the user WANT
to resize the window after the page is loaded the script will NOT
interfer.

Jan 2 '06 #6
GTi wrote:
Thomas 'PointedEars' Lahn wrote:
GTi wrote:
> I have a popup window, If this window is to smaal the scrollbars is
> visible.
> Is there any JavaScript available so I can check if the scrollbars is
> visible on page (right and bottom side)?
> Then I can auto resize the window so it dosen't show (until a maximums
> size).
You have not thought this through. Consider, for example that users have
a text zoom level that makes it impossible to display the window without
scrollbars on the current screen -- iff there is a (popup) window, and
iff there are scrollbars, provided by a graphical user interface.
[...]


To fill in some more information:


Where there was no need to SHOUT it.
This is only for POPUP windows AND for WEB APPLICATIONS.
And the JavaScript is only used to find the best size of the POPUP
window WHITIN maximum bounderies AT startup only. [...]

^^^^^^^^^^
What is your definition of "at startup"? If it means you want the window
opened with best size for all conceivable content, that is not possible;
unless you implement a layout engine in JS/ECMAScript, of course -- good
luck ;-)
PointedEars
Jan 2 '06 #7
VK

GTi wrote:
To fill in some more information:
This is only for POPUP windows AND for WEB APPLICATIONS.
And the JavaScript is only used to find the best size of the POPUP
window WHITIN maximum bounderies AT startup only. And if the user WANT
to resize the window after the page is loaded the script will NOT
interfer.


There are ways to allow/disallow scrollbars, but I do not recall any
method to query like isScrollbarDisp layed (same as with status bar).

But IMHO you're going from the opposite to the right direction:
scrollbars are not a natural phenomenon but a *consequence* of a
content which is too big for the provided viewport. So instead of study
the consequences you can jump right on the reason:
prepare the layout and find it offsetWidth / offsetHeight; then open
the window of the matching size. If the needed size is beyond the range
you still know in advance that scrollbars will appear - and you know
from what side(s).

Jan 2 '06 #8
VK said the following on 1/2/2006 10:54 AM:
GTi wrote:
To fill in some more information:
This is only for POPUP windows AND for WEB APPLICATIONS.
And the JavaScript is only used to find the best size of the POPUP
window WHITIN maximum bounderies AT startup only. And if the user WANT
to resize the window after the page is loaded the script will NOT
interfer.

There are ways to allow/disallow scrollbars, but I do not recall any
method to query like isScrollbarDisp layed (same as with status bar).

But IMHO you're going from the opposite to the right direction:
scrollbars are not a natural phenomenon but a *consequence* of a
content which is too big for the provided viewport. So instead of study
the consequences you can jump right on the reason:


And it is answered here:
<URL: http://allmyfaqs.net/faq.pl?AnySizeDesign >

Now, the size of my text (which you can't account for), my added
toolbars, and anything else is irrelevant and you don't need scripting
to figure it out.

--
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Jan 2 '06 #9
Randy Webb a écrit :
VK said the following on 1/2/2006 10:54 AM:
GTi wrote:
To fill in some more information:
This is only for POPUP windows AND for WEB APPLICATIONS.
And the JavaScript is only used to find the best size of the POPUP
window WHITIN maximum bounderies AT startup only. And if the user WANT
to resize the window after the page is loaded the script will NOT
interfer.


There are ways to allow/disallow scrollbars, but I do not recall any
method to query like isScrollbarDisp layed (same as with status bar).

But IMHO you're going from the opposite to the right direction:
scrollbars are not a natural phenomenon but a *consequence* of a
content which is too big for the provided viewport. So instead of study
the consequences you can jump right on the reason:

And it is answered here:
<URL: http://allmyfaqs.net/faq.pl?AnySizeDesign >

Now, the size of my text (which you can't account for), my added
toolbars, and anything else is irrelevant and you don't need scripting
to figure it out.


Allow me to help you make your list more complete:

http://developer.mozilla.org/en/docs..._on_scrollbars

Gérard
--
remove blah to email me
Jan 3 '06 #10

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

Similar topics

1
3129
by: Mickel Grönroos | last post by:
Hi, I have a Tkinter.Canvas of variable width. Is there a standard way of asking the canvas which parts of it that is visible? I.e. on the horizontal scale, I would like to know at what fraction from the left the left visibility border is and from what fraction to the right the right visibility border is. Consider this ascii picture as...
1
2910
by: Vangelis Natsios | last post by:
I want to create a page with a scrolling image that will cause different messages to appear on another part of the page (say, another <div>) as the image will scroll. Imagine something like this: Image DIV Text DIV (Visible Area) +-----------+ Image +---------+...
24
4667
by: Nobody | last post by:
Okay, you are all so smart in here. Answer me this: IE6 in standards mode doesn't seem to hide scrollbars on the body element (overflow:hide) Ain't this a quandary. I have it in my head that I need to specify html instead. The scrollbars do hide on Gecko browsers though, so there is definitely a disagreement among browser developers on...
1
559
by: Ben Reese | last post by:
I might be blind, but I cannot find a way to ensure that a particular row in my data grid is visible i.e the grid is scrolled so that the row at the current position of the currency manager is contained within the client rectangle. In fact just having the scrollbars default to being scrolled to the bottom would do. directly influencing the...
2
4319
by: Turgeson | last post by:
Is there anyway to determine if a DIV with its overflow style set to auto has the scrollbars visible? I have a dynamically built table inside my DIV. If the table is over a certain height and the scrollbars appear, I want to shrink the width of my table. If the table's height doesn't exceed the div's height, I want the table to be the same...
2
10726
by: delraydog | last post by:
Is there anyway to detect if scrollbars were made visible in a textarea? I'm not talking about initial setting of the scrolling attribute, but rather whether scrollbars have been added either horizontally or vertically based on the users text input? Thanks, Cliff.
3
17290
by: andrew.neale | last post by:
Hello, I have a div that has an overflow set to auto. I would like to know if the scrollbars are visible in javascript. Any help is appreciated. Thanks
1
1897
by: elziko | last post by:
Is there any way of knowing if scrollbars have appeared in a control that has a ScrollableControl that has AutoScroll set to True? I have found this: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemWindowsFormsScrollableControlClassScrollStateVScrollVisibleTopic.asp But it states that "is not...
0
7941
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7452
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7784
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6014
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5354
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5071
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3485
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3467
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
738
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.