www.webdeveloper.com
Results 1 to 8 of 8

Thread: Anchor link and IE

  1. #1
    Join Date
    Jan 2007
    Posts
    1

    Anchor link and IE

    Hi HTML experts,

    I totally confused about IE behavior with anchor link, on Firefox everything work fine.
    I have a Joomla page and a link to write comments:
    http://www.mazuronis.lt/bendrai-apie...d=9#komentuoti
    but IE don’t scroll to anchor link, I have tried to use < a name=”komentuoti”></a>, then <a id=”komentuoti”></a>, even saw somewhere this anchor <a name="komentuoti" id="komentuoti"></a>

    But nothing works in IE, so what is wrong, it so stupid thing that I even don’t know were to look more.

    Thanks for any thoughts

  2. #2
    Join Date
    Jan 2005
    Location
    Frankfort, KY, USA
    Posts
    6,167
    You code the link like this:
    <a href="page.htm#komenuoti"></a>

    The "page.htm" is the file name of the page the anchor is on.

    KDLA

  3. #3
    Join Date
    Jan 2007
    Posts
    1
    Quote Originally Posted by KDLA
    You code the link like this:
    <a href="page.htm#komenuoti"></a>

    The "page.htm" is the file name of the page the anchor is on.
    Actually, specifying the page name is not required and also doesn't fix the problem.

    I am having the same problem. It seems that at least in some cases, IE will not follow an HREF to an anchor *unless* the user has actually clicked the anchor with their mouse... In my case, my site dynamically determines the anchor depending on a variable and then uses an HTTP redirect to attempt to send the user to it (without them actually clicking any HREF).

    So for IE, I suspect a bit of Javascript that actually clicks the DOM anchor HREF on page load will be required.

  4. #4
    Join Date
    Feb 2009
    Posts
    2

    Joomla IE Anchor Issues

    Has anyone found a fix for this issue because I am stuck on this and haven't be able to find a resolution from anyone.

    The site link is:
    http://niquescapes.com/index.php?opt...id=7&Itemid=54

  5. #5
    Join Date
    Dec 2005
    Location
    American, living in Toronto, ON. CANADA
    Posts
    6,746
    <body><a title="top" name="top"/></a>
    illegally-closed tag. This tag is invalid as~written, therefore, it does not exist.
    Firefox may be 'kinder' and allow this, but brain-dead IE, to a fault, sometimes tries too hard to be correct and thus, fails to work...

    Write it this way:

    <body><a title="top" name="top"><!-- --></a>
    And this should work. I added the 'comment' tag to make it validate (the "<!-- -->" part in any 'blank' or 'empty' tag is required, to validate.)

    This works if the anchor is on the same page. Otherwise, re-visit KDLA's suggestion.

  6. #6
    Join Date
    Feb 2009
    Posts
    2
    Thank you, but that did not fix my problem. The "top" anchor works in all browsers. but the top anchor links "Design Re−Engineer Landscaping Irrigation Maintenance Terraform Lawn Treescape Homescape Vertiscape Hardscape Lightscape Waterscape" do not work in IE 6 or 7. This site is laid out in Joomla and the anchor navigation at the top is in the section description and the refer to each of the articles. I can get it to work if I make it all one article but it appears to only be a problem in the IE browsers so I was hoping for a hack solution.

    I did try the KDLA suggestion and it did not correct the problem.

  7. #7
    Join Date
    Jan 2005
    Location
    Frankfort, KY, USA
    Posts
    6,167
    Try getting your code as close to valid as possible (I know that's hard with Joomla): http://validator.w3.org/check?verbos...9%23komentuoti

    There are all sorts of problems in there that could be contributing to this. It's hard to work on a solution until the "problems" are streamlined a little.
    Last edited by KDLA; 02-06-2009 at 01:27 PM.

  8. #8
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    @ maluka The bookmark komentuoti does not exist

    @ KarmicVisions write semantic html:
    Code:
    <h3 id="landscaping">Landscaping</h3>
    Code:
    h3 {
    margin:0.5em 0;
    padding:0.2em 0.5em;
    text-aligh:left;
    font-style:italic;
    color:#fff;
    background:#50accc;
    }

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles