SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: Page Load Issue

  1. #1
    SitePoint Enthusiast
    Join Date
    Jun 2008
    Posts
    27
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Page Load Issue

    Hello,

    I have created a number of web pages that contain long forms.

    When the user clicks the submit button at the bottom of the web page,
    the next page loads, but the user sees the bottom of this page,
    not the top.

    Is there a way to have this page once it has finished loading jump
    to the top?

    Any help is appreciated.

    Thank you.

  2. #2
    We're from teh basements.
    Join Date
    Apr 2007
    Posts
    1,205
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sounds like it's jumping to an anchor in the second page. Hard to say without seeing your code.

  3. #3
    SitePoint Member
    Join Date
    Jun 2008
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    On second page, you try this
    <script type="text/javascript">
    window.onload = function()
    {
    document.body.scrollTop = document.body.scrollHeight;
    }
    </script>

    I have not tested yet but I think it should work.


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
  •