Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org
#

Q163 How can I make a frame pop in on a button click and pop out on a different button click?

You are here: irt.org | FAQ | JavaScript | Frame | Q163 [ previous next ]

Say you have a frameset document frame.html as follows:

<frameset cols="50%,50%">
<frame src="apage.html" name="left">
<frame src="bpage.html" name="right">
</frameset>

Now a form in apage.html can make bpage.html enlarged using:

<form>
<input type="button" onClick="top.location.href=parent.right.location.href" value="Kill Frame">
</form>

A form in bpage.html can frame the page with:

<form>
<input type="button" onClick="top.location.href='frame.html'" value="Frame Me">
</form>

Feedback on 'Q163 How can I make a frame pop in on a button click and pop out on a different button click?'

©2018 Martin Webb