Results 1 to 4 of 4
  1. #1

    * simple javascript window linking question

    how can i code a link on a popupped page so it closes itself, and opens the link in the window that originally opened the popup?

    i've seen it done before, but can't seem to find an exact example (if i could find one, i'd just 'borrow' the code)

    please help

  2. #2
    Within the original window:

    <script language="JavaScript">
    function newWindow(file,window) {
    if (msgWindow.opener == null) msgWindow.opener = self;

    <a href="javascript:;" onClick="newWindow('open2.htm','window2')">Open New Window</a>

    Within the new window:

    <script language="JavaScript">
    function load(file,target) {
    if (target != '')
    target.window.location.href = file;
    window.location.href = file;

    <a href="javascript:load('',top.opener)">load document in to opener and close this window</a>
    Last edited by EricP; 09-24-2002 at 05:09 PM.

  3. #3
    Thank you soooo much
    i'm a javascript 'tard

  4. #4
    Good script there EricP.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts