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
    Regular Coder
    Join Date
    Jun 2002
    Location
    UK
    Posts
    262
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Refresh link in pop up

    I have some javascript to refresh the parent window with th elink clicked within a pop up window.

    I have some problems, as the parent window is in frames - it opens within the frames. Here is the code i have tried to fix this but I can't get it to work, Any ideas?

    <a href="javascript:;" onclick="opener.location='http://www.link.com'; target='_parent'; self.close();">

    also tried:

    <a href="javascript:;" onclick="opener.location='http://www.link.com'; self.close();" target="_parent">

  • #2
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,043
    Thanks
    0
    Thanked 251 Times in 247 Posts

    if i understood you correctly...

    so you want to replace the frameset not the frame that opens the popup?

    try:

    <a href="http://www.link.com" onclick="if (opener)opener.top.location=this.href;self.close();return false;">

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Location
    UK
    Posts
    262
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Glenn,

    What I have is a site created in frames, in the main frame (not top or side), I have a link that opens a pop up window with some info and a list of links. When a user hits a link, I would like the pop up to close and the link to be loaded in the orginal window. At the moment its opening the link in the main frame....

    Will try your code...


  •  

    Posting Permissions

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