HTML Hyperlinks, how do i....?

letsgetsilly

Senior member
Oct 27, 2002
397
0
0
I'd like to create a hyperlink from one page that transfers to a position on another page.

For example, I'd like to create a link to a football team's latest scores, where the latest scores are located somewhere near the bottom of page "footballInfo.html"

So something like...

<a href = "footballInfo.html/#scores"> ???

Thanks for any help!
 

troytime

Golden Member
Jan 3, 2006
1,996
1
0
put <a name="scores"> where the scores are

then your link will be <a href="#scores">View Scores</a>

edit: if the scores are on a different file, then your link code is correct <a href="filename.html#anchorname">link text</a>
 

letsgetsilly

Senior member
Oct 27, 2002
397
0
0
That works great, thank you. Now I have a different problem.

I need to also pass a variable in the URL to the page. I've tried a couple of different methods without any luck. I can use the context if necessary but I would prefer to do it this way.

Here is the pseudo code of what I'm attempting:

<a href="newpage.aspx#location?Variable=5">Link</a>

No luck with this method. Any ideas? thanks in advance!
 

kamper

Diamond Member
Mar 18, 2003
5,513
0
0
<a href="newpage.aspx?Variable=5#location">Link</a>

AFAIK, the # part is always the last thing in a url.