Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Mar 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Close Window Link Only Visible in Popup

    Please help! Does anyone know how to create a text link "Close Window" that will appear on a popup window. The trick is, I need it to appear only if the window is a popup window not if it is the parent window. Please help! Thanks.

    Bill

  • #2
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,042
    Thanks
    0
    Thanked 250 Times in 246 Posts
    <script type="text/javascript">
    if (opener) document.write('<a href="#" onclick="window.close()">Close Window</a>');
    </script>

  • #3
    New to the CF scene
    Join Date
    Mar 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thanks!!!

    Thanks Glenn, this works great!!!


  •  

    Posting Permissions

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