SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    Oct 2003
    Location
    norway
    Posts
    92
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Accessing a popup from a window that has been redirected

    Hello,

    If you create a popup in a window, i.e wind = window.open('...','someWind'), you can easily access it using the wind var.. But if the opener window now has redirected to another page, "wind" will no longer be accessible... How do you aquire it again? Surely you must be able to use get it using 'someWind' somehow..?

    Just to clarify: from the opener to the popup, not the (often asked) other way around.

  2. #2
    I'll take mine raw silver trophy MikeFoster's Avatar
    Join Date
    Dec 2002
    Location
    Alabama, USA
    Posts
    2,560
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here's an excerpt from the Javascript 1.3 reference:
    You can use open on an existing window, and if you pass the empty string for the URL, you will get a reference to the existing window, but not load anything into it. You can, for example, then look for properties in the window.
    So, if the window named 'someWind' is already open, then calling window.open('', 'someWind') should return a reference to it.

    Of course, if 'someWind' is not already open, then calling window.open('', 'someWind') will open a new window with a blank page.

  3. #3
    SitePoint Enthusiast
    Join Date
    Oct 2003
    Location
    norway
    Posts
    92
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sweet! If this works (can't check it right now) you and me are having sex tonight

  4. #4
    I'll take mine raw silver trophy MikeFoster's Avatar
    Join Date
    Dec 2002
    Location
    Alabama, USA
    Posts
    2,560
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    well... it would have to be long-distance sex altho I would love to visit Norway

    hope it works for ya.


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
  •