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

Q53 How do I call a function in another frame?

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

Try:

<frameset col"50%,*">
<frame src="page1.htm">
<frame src="page2.htm" name="otherFrameName">
</frameset>

Then in page1.htm:

<script language="JavaScript"><!--
parent.otherFrameName.functionName();
//--></script>

Then in page2.htm:

<script language="JavaScript"><!--
function functionName() {
    alert('Hello world');
}
//--></script>

Feedback on 'Q53 How do I call a function in another frame?'

©2018 Martin Webb