View Full Version : Relative Links
sentence
03-05-2003, 12:14 AM
I am trying to create a link from one page in my site to a specific section of a second page in my site. I'm using hash marks and A Names, which work fine if I'm doing a relative link within the same page. However, when I try to do this to a specific location within a second page, same directory, the link takes me to the top of the second page, rather than lower down on the page where I want. The intra-page coding works fine in Netscape, but not in Internet Explorer. What do I need to code in Internet Explorer to get to the specific section of the second page? Thanks, Rob
Hihi! :)
Are you sure that the 'name' thing is right? There shouldn't be any problems.
Can you post the URL or the relevant code?
sentence
03-05-2003, 11:50 PM
Meow:
I posted two test pages to show the problem, at http://www.ralphrobertmoore.com/essays-test.html and http://www.ralphrobertmoore.com/chicken-test.html.
If you go to the essays page and click on the friends before food link near the top of the page, the relative link will take you to the friends before food section on that page. If you then click on the hot cheese chicken link, you’ll be taken to chicken-test.html. At the bottom of that page is a relative link back to the essays page, which should take you directly back to the friends before food section, but instead takes you to the top of the page.
What am I doing wrong?
Any help is really, really appreciated.
Thanks,
sentence
I didn't have a problem in the browsers I tried but you have an error where you have your friends anchor.
You have:
<A NAME="friends"</A><FONT SIZE=6>essays</FONT>
You lack the closing ">".
It's also better if the anchor has content. Either one of these should work:
<a name="friends"><font size=6>essays</font></a>
<font size=6><a name="friends">essays</a></font>
One of these validators would have found that in a blink. ;)
http://validator.w3.org/
http://www.htmlhelp.com/tools/validator/
Hope that works now. I think I saw the same error somewhere else too - let the validator do the work for you.
Cool site. I forwarded the URL to a friend that collects recipes. Hope that's OK. :thumbsup:
sentence
03-06-2003, 12:51 AM
Meow:
Thanks for the additional information! I had been looking at the pages using Yahoo! SBC’s browser, which is based on IE, and it kept turning up wrong, but then when you mentioned not having a problem through your browsers, I looked at the pages again using standard IE, and they were fine (as they are with Netscape).
I really appreciate your spending the time helping me. One of the best things about the Internet, to me, is not Flash or Amazon or Google, but discovering people such as yourself who are unselfish enough to help others.
I’m glad you liked the site and told a friend. It’s in transition now—I’m restructuring it.
We have nine cats, and they all thank you too (because now I can roll away from the monitor for a while and feed them).
No problems. Say hello to the cats. :D
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.