473,480 Members | 1,711 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Get a users window scroll value

Hi,
When I scroll my browser window, how do I get the value in pixels of
how much of the page I have scrolled?
Cheers
Burnsy

Aug 2 '05 #1
3 6606
bi******@yahoo.co.uk wrote:
Hi,
When I scroll my browser window, how do I get the value in pixels of
how much of the page I have scrolled?


<URL:http://www.quirksmode.org/viewport/compatibility.html>

Look for "Scrolling offset".

--
Rob
Aug 3 '05 #2
Hi,

Thanks, that worked great. I have one more question though.

How do you get the users visible screen width and height. I had a look
on the page you recommended above and it uses document.body.clientWidth
and document.body.clientHeight but this gives me the size of the the
page including that hidden before scrolling down. I just want the
screen size of the visible page. Any page hidden until the user scrolls
down I ont want to include in the measurement.

Any ideas?

Thanks

Burnsy

Aug 3 '05 #3
bi******@yahoo.co.uk wrote:
Hi,

Thanks, that worked great. I have one more question though.

How do you get the users visible screen width and height. I had a look
on the page you recommended above and it uses document.body.clientWidth
and document.body.clientHeight but this gives me the size of the the
page including that hidden before scrolling down. I just want the
screen size of the visible page. Any page hidden until the user scrolls
down I ont want to include in the measurement.


You need to be really clear with your terminology here. The 'visible
screen' is the computer screen and will have dimensions like 1024x768
or 1280x1024 etc. If you mean how big is the inside of the browser
window (which is what I think you mean), then heed Peter-Paul's advice:

"Extreme browser incompatibilities ahead."

You need to read the referenced page at quirksmode very carefully and
play on the test pages. The very first script (Inner width) will get
the inner dimensions for IE and most other browsers (they work for me
in IE and Firefox). But do read the associated text and go to the
test pages, you likely won't remember it all but at least you'll
appreciate the effort it must have required to for Peter-Paul to
develop the page.

Use the frameset link and have a look at the other stuff he has there,
it's all good.

--
Rob


--
Rob
Aug 3 '05 #4

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

Similar topics

19
30991
by: Darren | last post by:
I have a page that opens a popup window and within the window, some databse info is submitted and the window closes. It then refreshes the original window using window.opener.location.reload(). ...
16
1579
by: Konrad Viltersten | last post by:
Suppose you got a really long page and you'd like to enable the user (supposedly, there's only one but if it's not to difficult we could extend that to any number) not to have to scroll to the...
2
2172
by: Sachin | last post by:
To display the vertical scroll bar of any control (Print Preview Control in perticular)which window message is set? pls guide -- sachin
3
5246
by: Steve | last post by:
I want to force a window to scroll and am finding this to be an impossibly difficult task. First I tried using the API functions ScrollWindow and ScrollWindowEx but they do not work. The portion...
2
12558
by: Cheryl | last post by:
Hi, I have encounter a problem.Language use is C#. I would like to open a new window (is a modal window, where I m not able to switch from parent window after this window is open)from the parent...
4
1301
by: Dianna | last post by:
I am writing an ASP .NET application. Controls such as Listbox and combo box pick up the Users Themes from there PC and display selected items using such selected highlight colors. I have a...
2
3496
by: monomaniac21 | last post by:
Hi I know this isnt really a php question but can anyone tell me how you parse post variables to a popup window, here's my code so far, im trying to pass the value entered into a radio button: ...
3
14379
by: superjacent | last post by:
Hope someone can help. I have a listbox displaying time periods in blocks of 15 mins for a 24 hour period, all up 96 rows. The listbox can only visibly show 20 rows a time. The default...
0
7044
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6908
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7045
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
6944
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...
0
5341
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,...
1
4782
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...
0
2995
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...
0
1300
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
563
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.