1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Interesting problem with Firefox

Discussion in 'Software Development' started by jeremywms, Aug 5, 2006.

Thread Status:
Not open for further replies.
Advertisement
  1. jeremywms

    jeremywms Thread Starter

    Joined:
    Jul 27, 2006
    Messages:
    24
    After coding a web site and previewing it in Firefox, I am wondering why clicking on an image with the tag

    <a href="#top">

    does not take you the top of the page as it does in Explorer and Netscape. Here is a copy of my full code:

    <a href="#top"><img src="../global_images/topArrow.gif" width="13" height="13" border="0"></a>

    This works perfectly well in Explorer and Netscape, but when you click on the "topArrrow.gif" within the Firefox browser, absolutely nothing happens. I cannot find any documentation on this in the Firefox Knowledge Base, Forums or when I try to Google for an answer.

    If anyone has any help on this, I sure would appreciate it. I hate to think that my "go to top" arrows are not working with people browsing my site using Firefox. Thank you in advance...

    By the way, when I visit other web sites with "to top" links, they do work in Firefox. I've revealed the source code on those pages and cannot see what they are doing differently.
     
  2. DarqueMist

    DarqueMist

    Joined:
    Jan 16, 2001
    Messages:
    5,037
    What version of firefox are you using to test code? I'm using 1.5.0.6 and the return to top link at the bottom of this forum works fine for me.
    Check the menu bar at the bottom it uses the #top tag

    <a href="/all-other-software/489666-interesting-problem-firefox.html#top" onclick="self.scrollTo(0, 0); return false;">Top</a>
     
  3. jeremywms

    jeremywms Thread Starter

    Joined:
    Jul 27, 2006
    Messages:
    24
    WOW, you really know what you're talking about. That completely solved my problem. I also notice, that instead of putting in the entire address such as

    <a href="/all-other-software/489666-interesting-problem-firefox.html#top">

    it also works by simply putting

    <a href="#top">

    as the link. Do you think there is an advantage to putting in the entire address? I suppose you could make the link look like this:

    <a href="/index.htm#top">

    At any rate, the one piece of code that is absolutely necessary is that second part you gave me:

    <a href=... onclick="self.scrollTo(0, 0); return false;">

    This works both in Netscape and Firefox. You are a life-saver for me on this project. I appreciate it very much.
     
  4. DarqueMist

    DarqueMist

    Joined:
    Jan 16, 2001
    Messages:
    5,037
    I was really just taking an educated guess, the last half of that code looks like java script to me and was probably used because of the frame structure on this page. In a simple HTML page top of page should work fine and the whole page address shouldn't be needed.

    You might be better off if you click on the little red and white triangle beside your initial posts title and asking a moderator to move this to the HTML forum. You will more likely find someone in there that can answer the why it was needed and wether there is a more efficient way to go about it.

    [edit] oops, meant to say the Web Development forum not HTML forum
     
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Similar Threads - Interesting problem Firefox
  1. mohittomar13
    Replies:
    7
    Views:
    332
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/489666

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice