Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Detecting scrollbars
Message
 
To
19/04/2002 18:49:21
General information
Forum:
Internet
Category:
Javascript
Miscellaneous
Thread ID:
00647124
Message ID:
00647139
Views:
18
>How can I detect if a scrollbars are present within a page? I tried the following but that doesn't seem to work:
>
>
>if (window.scrollbars)
>{
>   alert('scrollbars exist')
>}
>else
>{
>   alert('scrollbars do not exist')
>}
>
Not tested, but must work:

Test the document.body.scroll property to know if scrollbar are on or off
and, if on, compare the document.body.scrollHeight (visible area)
with the document.body.clientHeight (window or frame height).
If we exchange an apple, we both get an apple.
But if we exchange an idea, we both get 2 ideas, cool...


Gérald Santerre
Independant programmer - internet or intranet stuff - always looking for contracts big or small :)
http://www.siteintranet.qc.ca
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform