faqts : Computers : Programming : Languages : JavaScript : DHTML

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

72 of 84 people (86%) answered Yes
Recently 8 of 10 people (80%) answered Yes

Entry

How can I find the current scroll position?
How can I find the current view port coordinates?
How can I find the current scroll position?

Mar 12th, 2000 10:47
Martin Honnen,


NN4+ has window properties
  window.pageXOffset
  window.pageYOffset
for that, IE4+
  document.body.scrollLeft
  document.body.scrollTop

For an application of these properties see
http://www.faqts.com/knowledge-base/view.phtml/aid/846/fid/128

IE4+ also supports a helpful
  window.onscroll
event handler.