Results 1 to 3 of 3

Thread: Problem with Javascript Redirect in Firefox

  1. #1
    Join Date
    Jul 2008
    Posts
    22
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default Problem with Javascript Redirect in Firefox

    Hi,

    I'm having a problem with getting a simple Javascript redirect to work. Basically I want it so that when the use hits the page they will straight away be redirected down to an anchor tag further down the page. My code works perfectly in IE, but not in Firefox. Here is the code I'm using:

    Javascript:
    Code:
    <script type="text/javascript">
    <!--
    window.location = "#thelink"
    //-->
    </script>
    HTML for anchor tag:
    Code:
    <a name="thelink"></a>

    Any ideas on what I might be doing wrong?

    Thanks in advance

  2. #2
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    The name isn't the scroll down part. The ID is, give another attribute with thelink as the value. For example:
    Code:
    <a name="thelink" id="thelink"></a>
    Jeremy | jfein.net

  3. #3
    Join Date
    Jul 2008
    Posts
    22
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default

    perfect, works well, thanks for your help

Bookmarks

Posting Permissions

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