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

Q153 How do I load a document in another frame when a button is clicked?

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

First name your frames:

<FRAMESET ROWS="50%,*">
<FRAME SRC="apage.html" NAME="upper">
<FRAME SRC="bpage.html" NAME="lower">
</FRAMESET>

Then in the apage.html file do the following to load the file in the lower frame:

<FORM>
<INPUT TYPE="BUTTON" onClick="parent.lower.location.href = 'file.htm;'">
</FORM>

Or the following in the bpage.html file to load the file in the upper frame:

<FORM>
<INPUT TYPE="BUTTON" onClick="parent.upper.location.href = 'file.htm;'">
</FORM>

©2018 Martin Webb