SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Evangelist jazztie's Avatar
    Join Date
    Mar 2001
    Location
    the Netherlands
    Posts
    519
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    call window.open() statement from popup

    I want to do the following:

    I have a window with information and texts. In the text there are links that refer to articles in the database.

    When someone clicks on the Link, a window is opened using a window.open(); statement.

    Now for the problem:
    - I just added a search-window which opens using a (different) window.open(); statement.
    - When someone searches for a word, a list is created with links.
    - I want to use the original window.open()-statement in the main window.

    How do I call the original statement?
    Because, when I use a window.open() statement in the pop-up, it won't work.

    Any help would be appreciated,
    Jazz

  2. #2
    SitePoint Enthusiast
    Join Date
    Apr 2001
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you create a function to open the window like
    Code:
    function popWin(url,name,attributes) {
          var result_win = window.open(url,name,attributes);
    }
    then you can call it from the search window like
    Code:
    <a href='javascript:window.opener.popWin("page.html","results","etc.");'>Link</a>
    Hope this helps
    <<< johnny chidiac
    johnnydaboy@mac.com


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
  •