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
    Sep 2008
    Posts
    6
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Question Problem with closing a popup window

    Hi,

    I have a popup window that I can't seem to get closed with a button.

    The page is opened from within a page that consists of 3 frames.

    The popup window is opened from a frame with frame name "framePage2" within an asp page called NarrFoot.asp.

    First, a window.open is used to open the frameset page.

    var objwindow = window.open ("narrsummnotepadframeset.asp?associd=" + associd + "&narrativepartnerid=" + partnerid , "MySummary", strfeatures);

    Then, the frameset page opens the actual frame, framePage2:

    <FRAME NAME="framePage2" SRC="narrsummnotepad.asp?associd=<%=request("associd")%>&narrativepartnerid=<%=narrativepartnerid%>" noresize>


    The page narrsummnotepad.asp is the actual popup that I can't seem to get closed. Is there something special I would need to do because of it being opened from a parent page?

    I've tried using something like:

    <input type='button' Name=btnCancel value='Close this Window'>

    function btnCancel_onClick()
    {
    window.opener = top
    window.close()
    }
    end function

    and several other ways, but I can't seem to get the window to close. Could someone give me a hand?

    Thanks!

  • #2
    Master Coder
    Join Date
    Apr 2003
    Location
    in my house
    Posts
    5,211
    Thanks
    39
    Thanked 201 Times in 197 Posts
    better to have got a mod to move your original thread from where it was to this forum.

    the starter thread his here for any mod who wants to move it.

    Problem with closing a popup window

    bazz
    "The day you stop learning is the day you become obsolete"! - my late Dad.

    Why do some people say "I don't know for sure"? If they don't know for sure then, they don't know!
    Useful MySQL resource
    Useful MySQL link

  • #3
    New to the CF scene
    Join Date
    Sep 2008
    Posts
    6
    Thanks
    1
    Thanked 0 Times in 0 Posts
    I GOT IT! YES!

    The credit goes to http://manda.com/frames/faq.html

    manda.com's faq provided me with parent.window.close() which works!!!

    A HREF="#" onClick="parent.window.close()">Close Window</A>

    or

    <FORM><INPUT type="button" value="Close" onClick="parent.window.close()"></FORM>


  •  

    Posting Permissions

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