...

View Full Version : Problem with closing a popup window



yznf
09-03-2008, 12:13 AM
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!

bazz
09-03-2008, 12:24 AM
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.

http://www.codingforums.com/showthread.php?t=147942

bazz

yznf
09-03-2008, 03:38 PM
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>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum