Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How far down the page has the user scrolled?

Status
Not open for further replies.

AndyGroom

Programmer
May 23, 2001
972
GB
I'd like to be able to find out whether people who visit my website are scrolling down past a certain point on some of the webpages - more precisely to know whether the page is visible on screen after a certain point. Is that in any way possible?

- Andy
___________________________________________________________________
If you think nobody cares you're alive, try missing a couple of mortgage payments
 
Oh right, thanks, is there also a way of measuring the size of the browser window too because presumably you'd need to know that as well?

- Andy
___________________________________________________________________
If you think nobody cares you're alive, try missing a couple of mortgage payments
 
Again, in IE at least, you can use:

document.body.offsetHeight

or

document.body.clientHeight

You can get the length of the page content (as opposed to window size) with:

document.body.scrollHeight

Dan




Coedit Limited - Delivering standards compliant, accessible web solutions

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top