Advanced Search

Results 1 to 9 of 9

Thread: HTML direct Links within page

  1. #1
    Join Date
    Mar 2009
    Posts
    74
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default HTML direct Links within page

    Hi,

    I'm new here and would be considered an extreme "starter" with HTML code. I'm looking to do something very simple, but I just can't find help on it anywhere with google.

    Basically, I run a sports website which is entirely vbulletin. I'm very good with copying code to create new templates. I've run into a snag with this project though.

    I created an alphabetical search bar like the memberlist.php page in vbulletin. I want to insert this into a page I created which has hundreds of hockey player links alphabetized under their corresponding alphabetical letter by last name.

    I would like each letter [when clicked] to go directly to that corresponding letter on the page.

    Basically, if a person clicks "K", they will automatically page down to where "K" is on the page.

    I hope this makes sense and I appreciate any help offered.

    Thank you
    Last edited by igotregistered; 03-12-2009 at 05:42 PM.

  2. #2
    Join Date
    Mar 2009
    Posts
    74
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    I've been doing some looing around and it appears it's

    HTML "Go To" code. Sort of like go to top of page, but I want to go directly to the letter clicked in the alphabetical search bar.

    Like below, I'd click on a and go directly to the "a's"

    a|b|c|d|e.............................

  3. #3
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,629
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    Code:
    <a href="#a">Click here to view "A" names</a>
    ...other content...
    <a name="a">
    Albert
    Anthony
    ...etc...
    if the link is on a different page than the name list, then it would be like this:

    Code:
    (linking page)
    <a href="namelistpage.htm#a">Click here to view "A" names</a>
    
    (name list page)
    ...other content...
    <a name="a">
    Albert
    Anthony
    ...etc...
    We Only Torture the Folks We Don't Like (You're Probably Gonna Be Okay)
    It's a Party in the CIA

  4. #4
    Join Date
    Mar 2009
    Posts
    74
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by traq View Post
    Code:
    <a href="#a">Click here to view "A" names</a>
    ...other content...
    <a name="a">
    Albert
    Anthony
    ...etc...
    if the link is on a different page than the name list, then it would be like this:

    Code:
    (linking page)
    <a href="namelistpage.htm#a">Click here to view "A" names</a>
    
    (name list page)
    ...other content...
    <a name="a">
    Albert
    Anthony
    ...etc...
    Hi Thank you for responding.

    Basically I think I'm starting to find the "real words" for what I'm trying to do now.

    HTML jump?

    1. I would have my menu bar like this on the top of my page:
    a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|v|w|x|y|z

    2. If I click "c" on the menu above it would take me to the letter c on my page below

    A
    Alberts, Tom
    Alvin, Gary
    Amber, Terry
    Ander, Jennifer

    B
    Barry, Len
    Brandow, Marlin
    Brent, Tom

    C<-------------
    Cat, Dog
    Crab, bob
    Christy, Tom

  5. #5
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

    Default

    HTML Code:
    <a href="#a">a</a>|<a href="#b">b</a>|<a href="#c">c</a>|etc.
    
    
    <a name="a">A</a>
    Alberts, Tom
    Alvin, Gary
    Amber, Terry
    Ander, Jennifer
    
    <a name="b">B</a>
    Barry, Len
    Brandow, Marlin
    Brent, Tom
    
    <a name="c">C</a>
    Cat, Dog
    Crab, bob
    Christy, Tom
    
    etc.
    Good luck!
    Eddy Proca
    I love Dropbox. Get it through my girlfriend's referral link (I reached my limit) and both you and her get 500 MB extra! Thanks and you're welcome!

  6. #6
    Join Date
    Mar 2009
    Posts
    74
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    I'm pretty sure this is a stupid question but should this work within php code?

  7. #7
    Join Date
    Mar 2009
    Posts
    74
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    WORKING! Thanks you guys. Awesome. Sorry such a noob. Thanks for the help!

  8. #8
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

    Default

    You're welcome, glad to help!
    You can go to your first post in this thread, click then click Go Advanced and add the Resolved prefix to the thread title.
    This will let other users know the problem has been solved.

    Good luck with your site!
    Eddy Proca
    I love Dropbox. Get it through my girlfriend's referral link (I reached my limit) and both you and her get 500 MB extra! Thanks and you're welcome!

  9. #9
    Join Date
    Mar 2009
    Posts
    74
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    Got, thanks again

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
  •