Solved

tables and href

Posted on 1999-01-13
15
357 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
  • 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
Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

 
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Border and image sizing 5 29
Using HTML5 and CSS How to place one element in front of another elemen 7 34
How to create a table with buttons 3 22
Javascript 2 26
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
Find out what you should include to make the best professional email signature for your organization.
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …

829 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