Log in

View Full Version : Resolved HTML direct Links within page



igotregistered
03-12-2009, 01:32 PM
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

igotregistered
03-12-2009, 04:45 PM
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.............................

traq
03-12-2009, 05:01 PM
<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:


(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...

igotregistered
03-12-2009, 05:14 PM
<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:


(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

Snookerman
03-12-2009, 05:18 PM
<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!

igotregistered
03-12-2009, 05:21 PM
I'm pretty sure this is a stupid question but should this work within php code?

igotregistered
03-12-2009, 05:25 PM
WORKING! Thanks you guys. Awesome. Sorry such a noob. Thanks for the help!

Snookerman
03-12-2009, 05:25 PM
You're welcome, glad to help!
You can go to your first post in this thread, click http://www.dynamicdrive.com/forums/images/buttons/edit.gif 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!

igotregistered
03-12-2009, 05:42 PM
Got, thanks again