SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Guru Todd Temple's Avatar
    Join Date
    Mar 2005
    Location
    Tennessee
    Posts
    797
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Is There A Name For This Function?

    I am looking for a javascript that would do the following:

    User would click on a link that opens a popup window while the main larger window is open behind the popup.

    Then, within the popup would be a link that, when clicked on, would close the popup window and pass a parameter to the main window behind it to go to an alternate URL instead of the original URL that would be shown.

    Is this possible (I am guessing so), and if so, I have no idea what to call this function or javascript in order to research and existing scripts that may already be out there on hotscripts.com, etc.

    Can anyone help me out here?

    Todd
    Todd Temple > T2 Design

  2. #2
    SitePoint Enthusiast
    Join Date
    May 2005
    Posts
    27
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Use opener JavaScript object.
    See http://www.quirksmode.org/js/croswin.html
    IntoVPS - Unmanaged VPS hosting
    IntoDNS - Check your DNS health and configuration

  3. #3
    SitePoint Guru Todd Temple's Avatar
    Join Date
    Mar 2005
    Location
    Tennessee
    Posts
    797
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This does only half of what I am trying to do.

    It shows how to make a "link" within the popup change the parent page's URL, but it does not show how to close the popup once that same "link" is clicked.

    I am trying to click a link in the popup and (1) change the URL of the main page beneath it, and (2) close the popup.

    Any other suggestions?
    Todd Temple > T2 Design

  4. #4
    SitePoint Enthusiast
    Join Date
    May 2005
    Posts
    27
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    HTML Code:
    <a href="javascript:opener.window.location='http://www.google.com/'; window.close()">go</a>
    IntoVPS - Unmanaged VPS hosting
    IntoDNS - Check your DNS health and configuration

  5. #5
    SitePoint Guru Todd Temple's Avatar
    Join Date
    Mar 2005
    Location
    Tennessee
    Posts
    797
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thats got it! Thanks so much for your assistance! I really appreciate it.
    Todd Temple > T2 Design


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
  •