SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Guru
    Join Date
    Oct 1999
    Location
    New York, NY
    Posts
    826
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    easy onclick help needed!

    Hi --

    I have a pop-up window announcing a section of my site. I'm able to get the code to where they click on the link to visit the page BUT I can't remember how to get the pop-up window to close after they click though to the linked page.

    Current code is:
    Code:
    <a href="javascript:openparent('mypage.php');">click to view</a>
    Thanks.

    Josh

  2. #2
    SitePoint Addict BenANFA's Avatar
    Join Date
    Apr 2003
    Location
    Bath, UK
    Posts
    353
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You need to call the function
    Code:
    window.close();
    either at the end of your openparent functionor in the onclick handler
    Code:
    <a href="java script:openparent('mypage.php');window.close();">click to view</a>

  3. #3
    SitePoint Guru
    Join Date
    Oct 1999
    Location
    New York, NY
    Posts
    826
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yep, that did it!

    Thanks Benanfa.


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
  •