Forums

This topic is locked

Jump to bottom of a page ?

Posted 03 Oct 2001 15:37:24
1
has voted
03 Oct 2001 15:37:24 Stephen Bateman posted:
Can anyone help me with a method (assuming JavaScript) of jumping to the bottom of a page?

I have a page in PHP that lists a set of records retrieved from a MySQL dB in order (so the latest record is at the bottom). This page refreshes every 60 seconds automatically so I need to scroll to the bottom each time.

There must be a way to automate this...

Thanks in advance.

GT

Replies

Replied 04 Oct 2001 13:49:16
04 Oct 2001 13:49:16 Praveen Kumar replied:
i guess u know how to do the "go to top" link.
it is the same.

incase u do not know.

in the bottom of the page create an anchor link this.

<a name="bottom"></a>

then in the top of your page create a link like this
<a href="#bottom">Go Down(change this to whatever u want)</a>

that's it u are done.

spk100
Replied 02 Nov 2008 19:31:21
02 Nov 2008 19:31:21 Stuart Denyer replied:
I know it's an ancient thread, but it has a high result in Google...

Stick something like onload="scrollTo(0,999999);" into the body tag.

(Or just invert the output from the PHP page so that the latest results are at the top?)

Edited by - Denyer on 02 Nov 2008 19:32:30
Replied 04 Nov 2008 10:21:50
04 Nov 2008 10:21:50 Alan C replied:
Stuart's suggestion sounds the best to me - I would also say 'Do you need to output ALL the records every 60 seconds' or could you cut it down ?

Reply to this topic