need code to rediect page

Discussion in 'JavaScript' started by hado, Feb 1, 2008.

  1. #1
    I try to write this
    windows.location = link
    but it`s not working
    I like to redirect link to link using JS any help?
    with best regards
     
    hado, Feb 1, 2008 IP
  2. nhl4000

    nhl4000 Well-Known Member

    Messages:
    479
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    110
    #2
    Did you put it between the script tag?
    Like this:
    <script type="text/javascript">
    window.location = "http://www.google.com/"
    </script>
    Code (markup):
     
    nhl4000, Feb 1, 2008 IP
  3. Dondon2d

    Dondon2d Peon

    Messages:
    3,193
    Likes Received:
    146
    Best Answers:
    0
    Trophy Points:
    0
    #3
    It's window.location not window.location, you can also use location = "URL"; syntax.
     
    Dondon2d, Feb 1, 2008 IP
  4. hado

    hado Peon

    Messages:
    24
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    ok thanks it`s work now
     
    hado, Feb 2, 2008 IP