SitePoint Sponsor

User Tag List

Results 1 to 17 of 17
  1. #1
    gimme the uuuuuuuuuuu duuudie's Avatar
    Join Date
    Feb 2004
    Location
    Switzerland
    Posts
    2,253
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Smile question about links inside a page

    Hi,
    heh. basic question.

    There are a lot of sites, like SPF, that have a top link at the bottom of the page. I was very interested in understanding how this works. The page has a link to itself, ok. However, does it reload or not? Is it a good practice?

    Thanks for your help.

  2. #2
    gingham dress, army boots... silver trophy redux's Avatar
    Join Date
    Apr 2002
    Location
    Salford / Manchester / UK
    Posts
    4,838
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    no, the page doesn't reload. it all happens client-side, without extra calls to the server. there's two things you can do:

    1) add named anchors <a name="blah"></a> in your page, to mark a destination (works in pretty much all browsers)

    or

    2) add fragment identifiers, i.e. proper IDs to elements (e.g. <h1 id="blah">Blah</h1>) - only works in version 5+ browsers, as far as i know

    then to link to that particular bit (either 1) or 2) ) just have a link going to <a href="#blah">go to Blah</a>
    re·dux (adj.): brought back; returned. used postpositively
    [latin : re-, re- + dux, leader; see duke.]
    WaSP Accessibility Task Force Member
    splintered.co.uk | photographia.co.uk | redux.deviantart.com

  3. #3
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,354
    Mentioned
    179 Post(s)
    Tagged
    6 Thread(s)
    And yes it's good practice on pages that have scrollable content as the user doesn't have to scroll all the way back to the top.

    It's good for accessibility and usability

    Paul

  4. #4
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,250
    Mentioned
    59 Post(s)
    Tagged
    3 Thread(s)
    "... as the user doesn't have to scroll all the way back to the top"

    sheesh, stupid users

    they never heard of the Home key?

    okay, fine, add a Top link
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  5. #5
    gimme the uuuuuuuuuuu duuudie's Avatar
    Join Date
    Feb 2004
    Location
    Switzerland
    Posts
    2,253
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by r937
    "... as the user doesn't have to scroll all the way back to the top"

    sheesh, stupid users

    they never heard of the Home key?

    okay, fine, add a Top link
    I must be one of them then

    Can you tell me more about it rudy?

    Thanks a lot for your help guys. As usual, your comments have been very enlightening. Redux, Paul and Rudy... my three masters.

  6. #6
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,250
    Mentioned
    59 Post(s)
    Tagged
    3 Thread(s)
    tell you more about the Home key???

    whoa, that's a tough one...



    let's see, do you have a bunch of keys above your arrow keys that look like this:
    Code:
    +------------+ +----------+ +-----------+
    |            | |          | |           |
    |   Insert   | |   Home   | |  Page Up  |
    |            | |          | |           |
    +------------+ +----------+ +-----------+
    
    +------------+ +----------+ +-----------+
    |            | |          | |           |
    |   Delete   | |   End    | | Page Down |
    |            | |          | |           |
    +------------+ +----------+ +-----------+
    well, let's see, um, how do i explain this...

    go to some web page, any one will do as long as it's long enough, i.e. you have to scroll down in order to get to the end

    then, um, press the Home key

    please tell me what you saw...
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  7. #7
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,250
    Mentioned
    59 Post(s)
    Tagged
    3 Thread(s)
    as a follow up, once you are at the top of the web page, press the End key and tell me what you see

    tomorrow's assignment: the Page Up and Page Down keys

    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  8. #8
    gimme the uuuuuuuuuuu duuudie's Avatar
    Join Date
    Feb 2004
    Location
    Switzerland
    Posts
    2,253
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    lol I feel dumb.

    I was expecting some 'typical rudy tricky technique'.

    By the way, I don't have an 'english' browser, that's probably why I didn't get your Home key joke in the first place. lol. Now I get it

  9. #9
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,250
    Mentioned
    59 Post(s)
    Tagged
    3 Thread(s)
    english browser or english keyboard?

    what are those keys called on your keyboard? does your keyboard have any keys like that?
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  10. #10
    Non-Member Egor's Avatar
    Join Date
    Jan 2004
    Location
    Melbourne, Australia
    Posts
    7,305
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    I never knew that, pretty useful, thanks

  11. #11
    gimme the uuuuuuuuuuu duuudie's Avatar
    Join Date
    Feb 2004
    Location
    Switzerland
    Posts
    2,253
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    rofl.

    I am really laughing. Excuse me for this misunderstanding. Now I get what you were talking about.

    Ok thanks for the tutorial. I will keep this Home key trick in mind. Check this thread for the Pageup PageDown questions to come. lol.

  12. #12
    SitePoint Zealot
    Join Date
    Mar 2003
    Location
    Morges Switzerland
    Posts
    102
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Please don'forget the arrow keys and the spacebar. I use very often the spacebar to go a page down.

    wimb

  13. #13
    gimme the uuuuuuuuuuu duuudie's Avatar
    Join Date
    Feb 2004
    Location
    Switzerland
    Posts
    2,253
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    should be a sticky somewhere.

  14. #14
    SitePoint Zealot
    Join Date
    Jan 2004
    Location
    Holland
    Posts
    141
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Where's home?!!

    Rudy,

    when I hit home while reading a thread in here, I end up at the last post on the page... Seems like your "keys 101" is lacking somewhat.
    Regards,
    Ronald.

  15. #15
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,250
    Mentioned
    59 Post(s)
    Tagged
    3 Thread(s)
    no, sopeome hax just skitched your keycapz aroung
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  16. #16
    SitePoint Zealot
    Join Date
    Mar 2003
    Location
    Morges Switzerland
    Posts
    102
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ronaldb66
    Rudy,
    when I hit home while reading a thread in here, I end up at the last post on the page... Seems like your "keys 101" is lacking somewhat.
    Sometimes any key brings me down to the last topic, unless I click somewhere in the page before touching a key.
    However, the next key does always what it should do. (all with Firefox)

    wimb

  17. #17
    gimme the uuuuuuuuuuu duuudie's Avatar
    Join Date
    Feb 2004
    Location
    Switzerland
    Posts
    2,253
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    heh... I guess it's the part of the thread where my 'top' question is revealed as a relevent question


Bookmarks

Posting Permissions

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