Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

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

irt.org | Knowledge Base | JavaScript | Frame | Q153 [ previous next ]

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

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>

Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 30th March 2008. Maintained by: Martin Webb and Michel Plungjan
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.