Link to home
Start Free TrialLog in
Avatar of ahoffmann
ahoffmannFlag for Germany

asked on

tables and href

I want to ancor several lines in a table.
This works with <a href=#ancor>  on the same document, but not with <a href=file#ancor> from/to another document, wher it alwas jumps to the beginning of the table.
Any hints?
Avatar of Christian_Wenz
Christian_Wenz

do you have an online example?
Avatar of ahoffmann

ASKER

no
Does it happen with several different browsers?

Have you checked that the name of the anchor is exactly the same?
happens with IE4.0, Netscape 3.x and 4.05
I tried this as well, and it can't be done, it will always jump to the begining of the table...

Unless you can split your table into 2 smaller tables and put the anchor in between.
ruperts, I won't believe (for now).
works fine for me in IE 4.x.. Can you post your code or email it to me at masseym@javanet.com

- Matt
while preparing an example, I found the solution:
 the problem where not the HREF tags, but the NAME tags.
(for the points) does anybody know what was wrong (the syntax was ok)?
If you have spaces after the # char it will not work.
Does it work if you use quotes: <A NAME="thename">?
My guess is that it could not find the anchor because the anchor had a # sign and should not have.  Therefore, it just jumped to the page and didn't actually jump to any anchor.  When you edited the anchor syntax, it was then able to jump to the anchor instead of just jumping to the page.

What did you change?
the answer above:  You have to have the # to decare it as an anchor.

I'm going to support@experts-exchange to answer my own question ;-)

In my answer, I meant that the actual anchor name may have had a # in it.  It doesn't need to and should not.  A proper example would be:
<a name="anchor1">
and use
<a href="#anchor1">

It sounds like the external link couldn't find the anchor and therefore went to the top.
ASKER CERTIFIED SOLUTION
Avatar of linda101698
linda101698

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial