1. Welcome! Please take a few seconds to create your free account to post threads, make some friends, remove a few ads while surfing and much more. ClutchFans has been bringing fans together to talk Houston Sports since 1996. Join us!

Stupid Question For the Day about "Home" and "End"

Discussion in 'BBS Hangout' started by hotballa, Nov 28, 2012.

  1. hotballa

    hotballa Contributing Member

    Joined:
    Dec 27, 2002
    Messages:
    12,521
    Likes Received:
    316
    So when you press the "Home" or "End" button on the keyboard, it takes you directly to the top or the bottom without any scrolling. You just jump to the top and bottom almost like if you hit a link, rather than scrolling to it like if you press "pgup" or "pgdown" button.

    So the stupid question is, how is this done?
     
  2. SwoLy-D

    SwoLy-D Member

    Joined:
    Jul 20, 2001
    Messages:
    37,618
    Likes Received:
    1,456
    Short Answer:
    The program knows where the screen begins or ends. :eek:

    HOME and END work differently depending on what program you are. PageUp and PageDown work based on the scroll bar on the right hand side of the program, going the percentage that constitutes a "screen" depending on your monitor and resolution size. If you're typing or on a word processor, or in a field where the cursor can move, HOME goes to the beginning of the line and END goes to the END of the line. Try using Ctrl and HOME or END and you go to the very beginning of the editable field or text. :cool:

    A true WINDOWS program will allow you to use your shortcut keys like this and won't do something funny when you try it.
     
  3. hotballa

    hotballa Contributing Member

    Joined:
    Dec 27, 2002
    Messages:
    12,521
    Likes Received:
    316
    but how does it know where it ends if it's a page you just clicked into?
     
  4. ipaman

    ipaman Member

    Joined:
    Nov 23, 2002
    Messages:
    13,208
    Likes Received:
    8,046
    has nothing to do with your page. all "pages" are files (markup files) and have a beginning and end. every high level language has an API that gives you access to the beginning or ending of any file.
     
  5. hotballa

    hotballa Contributing Member

    Joined:
    Dec 27, 2002
    Messages:
    12,521
    Likes Received:
    316
    Ah, and thats what the cache is for...to load said page which has all the info for the home and end buttons to work, right?
     
  6. ipaman

    ipaman Member

    Joined:
    Nov 23, 2002
    Messages:
    13,208
    Likes Received:
    8,046
    not really, cache is for performance. it is much faster for a browser to read a file from your local computer than to re-fetch from over the network again. Cookies are for tracking and keeping you authenticated (session cookie) so you don't have to log in to a webpage after every click. Simply put a cookie is a way to make a state less protocol (http) become state full or remember state.

    The history, forward, back buttons are part of DOM, Document Object Model. It's a standard for working with markup languages that all browsers and languages follow.
     
  7. SwoLy-D

    SwoLy-D Member

    Joined:
    Jul 20, 2001
    Messages:
    37,618
    Likes Received:
    1,456
    hotballa, are you asking in your OP only about internet or web browser pages, or all documents in any application? :confused:

    The behavior is different for markup languages. The document remains in memory as you have it on your screen, and the program is responsible for tying the HOME key to the beginning and the END key to the end of the document.

    I don't see where you're confused.:)
     

Share This Page

  • About ClutchFans

    Since 1996, ClutchFans has been loud and proud covering the Houston Rockets, helping set an industry standard for team fan sites. The forums have been a home for Houston sports fans as well as basketball fanatics around the globe.

  • Support ClutchFans!

    If you find that ClutchFans is a valuable resource for you, please consider becoming a Supporting Member. Supporting Members can upload photos and attachments directly to their posts, customize their user title and more. Gold Supporters see zero ads!


    Upgrade Now