Client-side JavaScript ScrollTo method

Results 1 to 3 of 3

Thread: Client-side JavaScript ScrollTo method

  1. #1
    Join Date
    Dec 1969

    Default Client-side JavaScript ScrollTo method

    Ok, so it&#039;s not an asp question directly though it&#039;s a problem I&#039;m facing in building an ASP chat room.<BR><BR>Whenever the message display frame refreshes the user is brought back to the top of the page even though the newest messages are displayed at the bottom.<BR>I would like to use a javascript methods, such as scrollto or scrollby, so the scroll bar automatically goes to the bottom of the screen.<BR><BR>The problem: these methods require that you give precise pixel numbers, while I&#039;d like to simply do scrollto(bottom), but that can&#039;t be done.<BR><BR>I realize that others have faced this problem which is why (I figure) the ASP chatrooms I&#039;ve looked at displays new messages at the top. I will resort to that if I can&#039;t find an adequate solution.<BR><BR>Many thanks,<BR><BR>Jarrod<BR>

  2. #2
    John D Guest

    Default Cheap Trick

    If your whole chat page is regenerated every time you could place and anchor like &lt;A NAME="#bottom"&gt; at the bottom of the page and then when you reload it, just make sure you reload: chatpage.asp#bottom<BR><BR>Hope that is a good work around...

  3. #3
    Join Date
    Dec 1969

    Default RE: Cheap Trick

    Thanks, great idea. I had just thought of a similar method using form buttons, but stumbled trying to get an (invisible) image to behave like a control button (using the focus() method).

Posting Permissions

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