...

View Full Version : Jump in the page after loading ...



freddybee
01-16-2003, 11:58 PM
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

chrismiceli
01-17-2003, 12:05 AM
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);

freddybee
01-17-2003, 12:08 AM
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 ???

Owl
01-17-2003, 02:44 AM
Hi Freddy Bee,

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

( ) ( )
>>V



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum