Results 1 to 3 of 3

Thread: Open close link

  1. #1
    Join Date
    Jul 2007
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Open close link

    I have a main page, user clicks on a link, a new browser window opens. Now the user wants to click on link within that new window to close the window and link to a new page on the main page..

  2. #2
    Join Date
    Nov 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    you could try something like this:

    Code:
    <script language="javascript" type="text/javascript">
    <!--
    function closeandrefresh(link) {
    window.opener.location = link;
    window.close();
    }
    -->
    </script>
    and use this as your link:
    HTML Code:
    <a href="someurl.html" onclick="closeandrefresh(this.href);return false">someurl.html</a>
    this should close the popup window and open the link in the original window

    -aseaofflames

    i haven't tested it so tell me what happens

  3. #3
    Join Date
    Nov 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    double post

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
  •