Berkeley CSUA MOTD:Entry 41682
Berkeley CSUA MOTD
 
WIKI | FAQ | Tech FAQ
http://csua.com/feed/
2025/07/09 [General] UID:1000 Activity:popular
7/9     

2006/2/3-7 [Computer/SW/Languages/Misc] UID:41682 Activity:nil
2/3     Hello, I'm trying to create an HTML page that'll give you live
        "tail -f logfile.log" output. I can do it with regular HTML,
        but the problem is the user has to constantly scroll to
        the bottom. Is there a javascript or something that'll
        simply scroll to the bottom for you? Thanks.
        \_ Every time there's an update, just output the data to the page and
           end it with (replace 42 with number of new lines):
           <script>window.scrollByLines(42);</script>
           This might not work in IE, though.  You could do something with
           plain window.scroll(x,y), but it will be more work.  --dbushong
        \_ Any reason you don't put a "<a name="end">" at the end and then go
           to the page as "page#end"?
           \_ I don't think that would repeatedly move you to the end, which
              is what (s)he's trying to do.
              \_ I'm pretty sure you could jump to the anchor with an onload
                 action in the body tag. -gm
                 \_ You're missing the point, this is a continuously updating
                    page that you keep occasionally adding new data to.  An
                    onload only fires once.  A #fragment only fires once.
                    \_ meta refresh?
2025/07/09 [General] UID:1000 Activity:popular
7/9     

You may also be interested in these entries...
2013/4/9-5/18 [Computer/SW/Mail, Academia/Berkeley/CSUA] UID:54647 Activity:nil
4/8     What's a good free e-mail provider? I don't want to use Gmail,
        Yahoo, Outlook, or any of those sites with features I never use that
        track my personal info and keep changing their interface. I want just
        simple e-mail without privacy issues or all the baggage these large,
        for-profit companies are adding. I might even be willing to pay.
        Recommendations?
	...