Solved

tables and href

Posted on 1999-01-13
15
360 Views
Last Modified: 2012-05-04
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?
0
Comment
Question by:ahoffmann
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
  • 2
  • +4
15 Comments
 
LVL 5

Expert Comment

by:Christian_Wenz
ID: 1841628
do you have an online example?
0
 
LVL 51

Author Comment

by:ahoffmann
ID: 1841629
no
0
 

Expert Comment

by:DavidME
ID: 1841630
Does it happen with several different browsers?

Have you checked that the name of the anchor is exactly the same?
0
Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

 
LVL 51

Author Comment

by:ahoffmann
ID: 1841631
happens with IE4.0, Netscape 3.x and 4.05
0
 
LVL 4

Expert Comment

by:ruperts
ID: 1841632
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.
0
 
LVL 51

Author Comment

by:ahoffmann
ID: 1841633
ruperts, I won't believe (for now).
0
 
LVL 10

Expert Comment

by:MasseyM
ID: 1841634
works fine for me in IE 4.x.. Can you post your code or email it to me at masseym@javanet.com

- Matt
0
 
LVL 51

Author Comment

by:ahoffmann
ID: 1841635
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)?
0
 
LVL 10

Expert Comment

by:MasseyM
ID: 1841636
If you have spaces after the # char it will not work.
0
 

Expert Comment

by:DavidME
ID: 1841637
Does it work if you use quotes: <A NAME="thename">?
0
 

Expert Comment

by:jrsjr
ID: 1841638
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?
0
 
LVL 10

Expert Comment

by:MasseyM
ID: 1841639
the answer above:  You have to have the # to decare it as an anchor.

0
 
LVL 51

Author Comment

by:ahoffmann
ID: 1841640
I'm going to support@experts-exchange to answer my own question ;-)

0
 

Expert Comment

by:jrsjr
ID: 1841641
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.
0
 
LVL 7

Accepted Solution

by:
linda101698 earned 50 total points
ID: 1841642
ahoffmann asks that I post the following answer to this question.

Linda Gardner
Customer Service @ Experts Exchange


    Ancors in a table *must* be inside the <TD> or <TH> tags to work properly.
    Example:

    <A HREF="#table_ancor">good</A>
    <A HREF="#bad_ancor"  >bad</A>
    <TABLE> ...
    <TD><A NAME=table_ancor>data</TD>
    <A NAME=bad_ancor><TD>next data</TD>
     ...
    </TABLE>


0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question