Forums / General Questions / Why do # references link to the home page

Why do # references link to the home page

Locked

Views: 1,091

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
25 Jul 2007, 5:06 PM
#1
mygreygoose avatar

mygreygoose

New Zenner

Join Date:
Jun 2007
Posts:
91
Plugin Contributions:
0

Why do # references link to the home page

Any time I want to use something like <a href="#" etc.> or <a href="#JumpToA-NameLink"> It clicks through to my homepage. Do I have something set up wrong (and if so, how do I change this to avoid this), or is it supposed to do that?

How do I do A Name references, e.g., for my FAQ links within one page. For example, I have a long list of:

<a href="#link1">How do I order?</a><br>
<a href="#link2">How much does it cost?</a><br>
<a href="#link3">Can I cancel at any time?</a><br> (etc., followed by)

<a name="link1"></a>How do I order?<br> (etc.)

25 Jul 2007, 7:37 PM
#2
shirster avatar

shirster

Zen Follower

Join Date:
Sep 2005
Location:
Hong Kong
Posts:
301
Plugin Contributions:
0

Re: Why do # references link to the home page

I think you'd have to use the correct URLs, say your page is "http://www.example.com/index.php?main_page=page&id=1&chapter=0", you would have to use :

<a href="http://www.example.com/index.php?main_page=page&id=1&chapter=0#link1" title="How to order">How do I order?</a>

HTH
Shirley :)

25 Jul 2007, 9:32 PM
#3
mygreygoose avatar

mygreygoose

New Zenner

Join Date:
Jun 2007
Posts:
91
Plugin Contributions:
0

Re: Why do # references link to the home page

Thanks Shirley! With that, I was able to get it to work. And I didn't have to use the whole URL... just the page part. So:

<a href="index.php?main_page=page&id=1&chapter=0#link1" title="How to order">How do I order?</a>