SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: Redirect?

  1. #1
    Wishful Thinking webmasternovis's Avatar
    Join Date
    Jul 2002
    Location
    England
    Posts
    430
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Redirect?

    Hi Guys,

    Just wondering if anyone knows how to redirect in Javascript. If anyone does would you be kind enough to reply with it here please?

    Cheers
    Mike

  2. #2
    Currently Occupied; Till Sunda Andrew-J2000's Avatar
    Join Date
    Aug 2001
    Location
    London
    Posts
    2,475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by webmasternovis
    Hi Guys,

    Just wondering if anyone knows how to redirect in Javascript. If anyone does would you be kind enough to reply with it here please?

    Cheers
    Mike

    Code:
    function redirect(url)
    {
      document.location.href = url;
    }
    var url = 'http://www.sitepoint.com';
    redirect(url);


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
  •