SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Evangelist Alexandra's Avatar
    Join Date
    Aug 2002
    Location
    Perth, Australia
    Posts
    414
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Make link in popup window open in original window

    Hi!

    I would like to have a link in a pop-up (for want of a better term) window open in the original browser window, switching focus from the pop-up to the original window at the same time.

    Is this possible, and how do I go about implementing it?

    I hope I'm in the right place...
    Alex Graham
    Cadmium Design & Development
    www.cadmium.com.au
    alexandra@cadmium.com.au

  2. #2
    SitePoint Evangelist Alexandra's Avatar
    Join Date
    Aug 2002
    Location
    Perth, Australia
    Posts
    414
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Not sure what you mean either...ok, here goes...step by step explanation.

    1. User visits website with link.
    2. User clicks on link and opens new page of information in new window.
    3. User click on link on new page.
    4. New links opens in original window, focus changed from popup to original window (popup sent to back)

    Does that make more sense?
    Alex Graham
    Cadmium Design & Development
    www.cadmium.com.au
    alexandra@cadmium.com.au

  3. #3
    SitePoint Wizard gRoberts's Avatar
    Join Date
    Oct 2004
    Location
    Birtley, UK
    Posts
    2,439
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    use the window.opener object.

    Code:
            function go() {
                if (window.opener && !window.opener.closed)
                    window.opener.location = 'http://www.google.co.uk';
            }

    IIRC this will ONLY work if you use Window.Open to open the pop-up.



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
  •