/    Sign up×
Community /Pin to ProfileBookmark

Close FRAMED Windows

Hi all,

Please help if you can.

I have a Framed Page with TOP_FRAME and BOTTOM_FRAME.

I need to add a CLOSEWINDOW Function which will close the FRAMESET. I can write the script to close the TOP_FRAME and the BOTTOM_FRAME but not both together.

THE FRAMESET.

<html>
<head>
<title>External Link</title>
<meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1″>
</head>
<frameset rows=”74,*” frameborder=”NO” border=”0″ framespacing=”0″ cols=”*“>
<frame name=”topFrame1″ scrolling=”NO” noresize src=”TOPFRAME.htm” >
<frame name=”mainFrame” src=”http://www.hmce.gov.uk“>
</frameset>
<noframes>
<body bgcolor=”#FFFFFF” text=”#000000″>
</body>
</noframes>
</html>

TOPFRAME.

<html>
<head>
<title>External Link Top Frame</title>
<meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1″>
<script language=”JavaScript”>
<!–
function closewindow(curcon) {
window.close();
}
//–>
</script>
</head>

<body bgcolor=”#FFFFFF” text=”#000000″ background=”../images/Background.gif”>
<table width=”100%” border=”3″ bordercolor=”#990000″>
<tr>
<td width=”68%”><img src=”../images/retrun.gif” width=”251″ height=”44″ usemap=”#Map” border=”0″></td>
<td width=”32%”>
<div align=”right”><img src=”../images/homepage.gif” width=”236″ height=”33″ align=”top”></div>
</td>
</tr>
</table>
<map name=”Map”>
<area shape=”rect” coords=”106,24,155,35″ href=”javascript:closewindow()”>
</map>
</body>
</html>

BOTTOM FRAME.

This is an external link.

Can you help please.

Regards,

Dereck

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@vickers_bitsJan 10.2003 — not sure exactly what you're on about but i think you want to close the top frame, but leave the bottom frame in the window.

i think it will reload the bottom frame but...

function closewindow(){

//if your frameset is within a 3rd party frameset, only breakout of yours

if (top==parent)

top.location.href=top.mainFrame.location.href;

else

parent.location.href=parent.mainFrame.location.href;

};
Copy linkTweet thisAlerts:
@dcjonesauthorJan 10.2003 — Hi and thanks for your reply.

I want to close the complete FRAMESET, both top and bottom.

Can you help please


Regards


Dereck
Copy linkTweet thisAlerts:
@dcjonesauthorJan 10.2003 — [i]Originally posted by dcjones [/i]

[B]Hi and thanks for your reply.



I want to close the complete FRAMESET, both top and bottom.



Can you help please





Regards





Dereck [/B]
[/QUOTE]
×

Success!

Help @dcjones spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...