Automatic Scrolldown on a page - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Automatic Scrolldown on a page

ColacXColacX Posts: 141Member
Hi I've made a simple chat page using php. the thing is when people post many chat messages they eventually have to scroll down the page to see the messages. I want a code in either html or php that scrollsdown to the bottom of the page automaticly. Thanks for you help.

http://81.216.201.165/betterchat/betterchat.html
http://81.216.201.165/

Feel free to visit.
This server is on my laptop so it's not online 100% of the day. I'm still learning how to build a webpage, this is just an experiment page. Feel free to comment about server security/performance and stuff.
«1

Comments

  • Jahedx99Jahedx99 Posts: 4Member
    : Hi I've made a simple chat page using php. the thing is when people
    : post many chat messages they eventually have to scroll down the page
    : to see the messages. I want a code in either html or php that
    : scrollsdown to the bottom of the page automaticly. Thanks for you
    : help.
    :
    : http://81.216.201.165/betterchat/betterchat.html
    : http://81.216.201.165/
    :
    : Feel free to visit.
    : This server is on my laptop so it's not online 100% of the day. I'm
    : still learning how to build a webpage, this is just an experiment
    : page. Feel free to comment about server security/performance and
    : stuff.
    :

    Why not just do a .focus() on something at the bottom of you page in javascript page load?

    Jahedx99,
    http://www.progtalk.com
  • ColacXColacX Posts: 141Member
    : Why not just do a .focus() on something at the bottom of you page in
    : javascript page load?
    :
    : Jahedx99,
    : http://www.progtalk.com
    If that is the only way ill be happy to do that. Got a shortcode for it?
  • zibadianzibadian Posts: 6,349Member
    : : Why not just do a .focus() on something at the bottom of you page in
    : : javascript page load?
    : :
    : : Jahedx99,
    : : http://www.progtalk.com
    : If that is the only way ill be happy to do that. Got a shortcode for
    : it?

    Here's a good tutorial about web coding: http://www.w3schools.com/

    You could also use a name-tag and link to that.
  • ColacXColacX Posts: 141Member
    : : : Why not just do a .focus() on something at the bottom of you page in
    : : : javascript page load?
    : : :
    : : : Jahedx99,
    : : : http://www.progtalk.com
    : : If that is the only way ill be happy to do that. Got a shortcode for
    : : it?
    :
    : Here's a good tutorial about web coding: http://www.w3schools.com/
    :
    : You could also use a name-tag and link to that.

    Codes people or a link to codes or really good google keywords.

    Been to that site already and use it reguarly not sure where to look
  • zibadianzibadian Posts: 6,349Member
    : : : : Why not just do a .focus() on something at the bottom of you page in
    : : : : javascript page load?
    : : : :
    : : : : Jahedx99,
    : : : : http://www.progtalk.com
    : : : If that is the only way ill be happy to do that. Got a shortcode for
    : : : it?
    : :
    : : Here's a good tutorial about web coding: http://www.w3schools.com/
    : :
    : : You could also use a name-tag and link to that.
    :
    : Codes people or a link to codes or really good google keywords.
    :
    : Been to that site already and use it reguarly not sure where to look
    :
    For the name tag: HTML > Links. There's also an example entitled "Link to a location on the same page".
  • ColacXColacX Posts: 141Member
    okay this was intressting so i made my anchor tag but how do i trigger it automaticly after the page has loaded?



    ?php? ?
  • zibadianzibadian Posts: 6,349Member
    : okay this was intressting so i made my anchor tag but how do i
    : trigger it automaticly after the page has loaded?
    :
    :
    :
    : ?php? ?
    :
    With the #bottom after the url, as can be read at the header "The Anchor Tag and the Name Attribute" on the same page.
    Working example: http://rinkworks.com/stupid/cs_mincing.shtml#1
  • ColacXColacX Posts: 141Member
    Ahh so it hangs on the url of the link. Oh but why didnt you say so earlier. Lol thanks.
  • zibadianzibadian Posts: 6,349Member
    : Ahh so it hangs on the url of the link. Oh but why didnt you say so
    : earlier. Lol thanks.

    Because it's explained in the tutorial.... www.w3schools.com is truly a good site to learn various web-languages and a quick reference for them.
  • ColacXColacX Posts: 141Member
    Yeah I know and I do use that page. Your previos comment doesn't make any sense at all but your link does. Might be my bad english

    : With the #bottom after the url, as can be read at the header "The
    : Anchor Tag and the Name Attribute" on the same page.
    : Working example: http://rinkworks.com/stupid/cs_mincing.shtml#1

    Oh wait now i understand what you mean.
    :as can be read at the header "The
    : Anchor Tag and the Name Attribute" on the same page.
    confuses me.
«1
Sign In or Register to comment.