SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast BigKingy's Avatar
    Join Date
    Jun 2004
    Location
    London
    Posts
    83
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Popup auto-redirecting parent window after 10 seconds....

    I have a popup window that the user opens, and then after say 10 seconds I want it to redirect the parent window that opened the popup to another page.

    As im sure you know, the usual way of redirecting after a set time is:

    <meta HTTP-EQUIV="REFRESH" CONTENT="10;URL=http://newsite.com/newpage.html">

    But how can I put that in the popup, but then get the parent window to redirect, rather than the popup?

    Thanks.

  2. #2
    SitePoint Addict psyon's Avatar
    Join Date
    May 2004
    Location
    Cedar Rapids
    Posts
    295
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    function changeParentUrl() {
      window.opener.location.href = 'http://newsite.com/newpage.html';
    }
    
    setTimeout(10000, 'changeParentUrl()');


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
  •