window.location.href

Discussion in 'Javascript' started by debugger, Mar 14, 2005.

  1. debugger

    debugger Guest

    I am using window.location.href("#top") for few anchors. The code works
    fine on most of the browsers. It does not however work on Safari. Any
    suggestions?
    Thanks
    debugger, Mar 14, 2005
    #1
    1. Advertising

  2. debugger

    Evertjan. Guest

    debugger wrote on 14 mrt 2005 in comp.lang.javascript:

    > I am using window.location.href("#top") for few anchors. The code works
    > fine on most of the browsers. It does not however work on Safari. Any
    > suggestions?


    Really?

    window.location.href = "#top"


    --
    Evertjan.
    The Netherlands.
    (Replace all crosses with dots in my emailaddress)
    Evertjan., Mar 14, 2005
    #2
    1. Advertising

  3. debugger

    Mick White Guest

    debugger wrote:
    > I am using window.location.href("#top") for few anchors. The code works
    > fine on most of the browsers. It does not however work on Safari. Any
    > suggestions?
    > Thanks
    >

    "top" is a reserved word I would avoid using it.
    Mick
    Mick White, Mar 14, 2005
    #3
  4. debugger

    debugger Guest

    thanks. You are right. window.location.href is not a function. so,
    window.location.href="#something" will work. thanks again.
    debugger, Mar 14, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Leon
    Replies:
    1
    Views:
    10,175
    Boban Dragojlovic
    Jun 24, 2003
  2. Joshua Beall
    Replies:
    26
    Views:
    219,934
    AndreiKaa
    Jun 29, 2007
  3. saiho.yuen
    Replies:
    3
    Views:
    409
    kaeli
    Sep 14, 2004
  4. Replies:
    2
    Views:
    444
  5. Alex Bird
    Replies:
    3
    Views:
    168
    Thomas 'PointedEars' Lahn
    May 9, 2008
Loading...

Share This Page