SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Hybrid View

  1. #1
    SitePoint Enthusiast
    Join Date
    Jun 2004
    Location
    New Jersey
    Posts
    69
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Scrolling to the bottom of the window...

    The issue seems to be that when the buffer becomes extremely large instead of scrolling to the bottom of the window, there is a gap at the bottom instead.

    Here is the test code I've been using, and it allows me to get to around 18000 pixels before the gap begins...
    Code:
    window.scrollTo(0, Math.max(document.documentElement.offsetHeight,
    			    document.body.scrollHeight
    			    ) + 
    			   (window.innerHeight || 
    			    document.body.clientHeight
    			    ) + 100);
    window.scrollBy(0, Math.max(document.documentElement.offsetHeight,
    			    document.body.scrollHeight
    			    ) + 
    			   (window.innerHeight || 
    			    document.body.clientHeight
    			    ) + 100);
    The issue is really driving me crazy, hopefully someone will be able to help me out.

    Please do not suggest putting a link at the bottom of the content (IE: <a name="bottom">asdf</a>, url#name) for this is not an option.

    Thanks in advance.
    Last edited by evolve; Aug 25, 2007 at 09:59.

  2. #2
    SitePoint Enthusiast
    Join Date
    Jun 2004
    Location
    New Jersey
    Posts
    69
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Bump...anyone please?


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •