HighDots Forums  

Re: looking for the right command

alt.html.dhtml alt.html.dhtml


Discuss Re: looking for the right command in the alt.html.dhtml forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Martin Honnen
 
Posts: n/a

Default Re: looking for the right command - 08-11-2003 , 04:35 AM








Chad Lupkes wrote:
Quote:
Hi all,

I'm looking for a command in html, dhtml or javascript that will instruct
the browser to jump to the top and bottom of a page. Right now I'm doing it
with anchors, and I'm wondering if there isn't some other way of doing it.
Anchors are fine as they work even is script is not supported.
If you want to use script then you can use
window.scrollTo(0, 0)
to scroll to the top. To scroll to the bottom you need to find the
length of the page which is browser dependant, try
window.scrollTo(0, document.height ? document.height :
document.body.scrollHeight)



--

Martin Honnen
http://JavaScript.FAQTs.com/



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.