javascript redirect

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ballygowanboy
    New Member
    • Jul 2007
    • 47

    javascript redirect

    hi, i copied a redirect script from some site

    Code:
    <script type="text/javascript1.2">
    <!--
    window.location = "http://www.url.com"
    //-->
    </script>
    i tested this in work and worked fine, but tried it at home, using firefox with linux, and the script doesn't work.

    is there something wrong with this script? is there a more robust one?

    thanks
  • ballygowanboy
    New Member
    • Jul 2007
    • 47

    #2
    one other thing, if they've javascript turned off, is there another way to redirect?

    Comment

    • gits
      Recognized Expert Moderator Expert
      • May 2007
      • 5390

      #3
      Originally posted by ballygowanboy
      hi, i copied a redirect script from some site

      [code=javascript]<script type="text/javascript1.2">
      <!--
      window.location = "http://www.url.com"
      //-->
      </script>[/code]

      i tested this in work and worked fine, but tried it at home, using firefox with linux, and the script doesn't work.

      is there something wrong with this script? is there a more robust one?

      thanks
      hi ...

      try to use:

      [CODE=javascript]window.location .href = 'new_location';[/CODE]
      kind regards

      Comment

      • gits
        Recognized Expert Moderator Expert
        • May 2007
        • 5390

        #4
        Originally posted by ballygowanboy
        one other thing, if they've javascript turned off, is there another way to redirect?
        have a closer look at

        [HTML]<meta http-equiv="refresh" content="5; URL=page_url">[/HTML]
        kind regards

        Comment

        • ballygowanboy
          New Member
          • Jul 2007
          • 47

          #5
          ............... ........thanks

          Comment

          • gits
            Recognized Expert Moderator Expert
            • May 2007
            • 5390

            #6
            hi ...

            does it work the way you want? :) and is your problem resolved?

            kind regards

            Comment

            Working...