Announcement

Collapse
No announcement yet.

scroll to bottom of page on refresh

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • scroll to bottom of page on refresh

    Okay, is this possible at all? Can a page refresh and automatically scroll to the bottom of the page?

    I've tried this using anchors and it doesn't work:


    Code:
    <META HTTP-EQUIV="Refresh" CONTENT="20;URL=http://www.mysite.com/chat.php#bottom">

  • #2
    I'm not sure about how to obtain the document's height but...

    Code:
    <body onLoad="window.scrollBy(document_height, 0);">
    Just figure out a way to get the document height into javascript and you're all set sorry, don't know it...yet

    Comment


    • #3
      <html>
      <head>
      <script>
      function go(){
      setTimeout(window.location='#bottom', 20000);
      }
      </script>
      </head>

      <body onload='go()'>

      .......yadayada

      </table>
      <a name='bottom'>&nbsp;</a>
      </body>
      </html>

      Comment

      Related Topics

      Collapse

      Working...
      X