Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Jun 2002
    Location
    Paris, France
    Posts
    35
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Jump in the page after loading ...

    I would like to add a function that jump to a specific position in the page after loaded.

    in HTML, <A href="#there">link</A> where I've got a tag like <span id="here">bla bla </span> performs what I want to achieve ....

    Here I would like to have a function called after loading ( <body onload="Jump();"> ..... ) that jump to a specific position.

    Any idea ????


    Thank for your valuable help
    [color=dark blue]Freddy Bee[/color]

  • #2
    Regular Coder
    Join Date
    Sep 2002
    Location
    Louisiana
    Posts
    576
    Thanks
    0
    Thanked 0 Times in 0 Posts
    there is a function called
    window.scrollTo(x,y);
    mabey that will be of use, you could use it like this
    window.scrollTo(50,0);

  • #3
    New Coder
    Join Date
    Jun 2002
    Location
    Paris, France
    Posts
    35
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You are right but how could I know that it is 50 and not 75 ....

    all my pages are built dynamically ... so I do not know in advance where to jump (I know only that the line as the id marked)

    Any idea ???
    [color=dark blue]Freddy Bee[/color]

  • #4
    Owl
    Owl is offline
    New Coder
    Join Date
    Jun 2002
    Posts
    62
    Thanks
    0
    Thanked 1 Time in 1 Post
    Hi Freddy Bee,

    <BODY onload="location.hash='here'">
    .
    .
    <A name="here">here</A>
    .
    .
    </BODY>

    ( •) (• )
    >>V


  •  

    Posting Permissions

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